plotting time series

16 views
Skip to first unread message

Maya Hadar

unread,
Aug 14, 2015, 5:09:14 AM8/14/15
to Israel R User Group

היי כולם!
יש לי רשימה של אירועים לפי תאריכים ואני מנסה לפלוט אותם אבל אר לא מוכן בגלל שצורת התאריך מבלבלת אותו.

חיפשתי קצת באינטרנט ומצאתי את הפונקציה

data$date2 <- as.Date(data$date2, '%d.%m.%Y')

שאמורה להגיד ל אר שהתאריכים שלי הם תאריכים ולא סתם מספרים שמופרדים בנקודות.

עם זאת, כשהרצתי את הפקודה קיבלתי את השגיאה הבאה:

"Error in as.Date.default(data$date2, "%d.%m.%Y") : 
  do not know how to convert 'data$date2' to class “Date”"

שזה בעייתי, כי אם אר לא יודע מה לעשות, אני בטח לא...

האם למישהו יש ניסיון עם יצירת פלוטים של תאריכים?

אשמח מאוד לסיוע!

המון תודה

מאיה

Yoni Sidi

unread,
Aug 14, 2015, 8:33:00 AM8/14/15
to Israel R User Group
can you past the head of the data.frame the series you are trying to plot is in. that would give us an idea of how to help you since date strings can come in any form.

head(df)

yoni
Reply all
Reply to author
Forward
0 new messages