[R] Getting a Error: unexpected symbol in:
Sajjad Jafri
sjafri83 at gmail.com
Fri Dec 12 22:43:13 CET 2014
I am trying to create a simple function that finds the number of days
between two dates. However, when I run the function, R gives me an error
message saying:
unexpected '}' in " }"
Here is my function:
#create a function that finds the number of days between two dates
diffdate<-function(x,y){
z<-unclass(as.Date(x))
z1<-unclass(as.Date(y))
}
{
return z1-z
}
[[alternative HTML version deleted]]
More information about the R-help
mailing list