[R] problem with data

Sarah Goslee sarah.goslee at gmail.com
Thu Mar 8 14:56:38 CET 2012


You don't provide either dput() or str() results, so nobody here knows exactly
what your data format is. But as a first guess, you should probably be using
sart<-x.sub$Time[1]
instead.

Sarah

On Thu, Mar 8, 2012 at 4:35 AM, RMSOPS <ricardosousa2000 at clix.pt> wrote:
> Hello
>
>   In the variable x.sub$Time i have the many dates in format  2006-10-31
> 20:10:35 EST, for example when
> print (x.sub$Time) give this
>
> [1] "2006-10-31 20:10:35 EST" "2006-10-31 20:11:08 EST" "2006-10-31 20:11:21
> EST" "2006-10-31 20:12:16 EST"
>  [5] "2006-10-31 20:13:20 EST" "2006-10-31 20:13:28 EST" "2006-10-31
> 20:15:18 EST" "2006-10-31 20:16:06 EST"
>
> but when put in variable start the result in first position with code
> sart<-x.sub$Time[[1]], my goal by this code is save the
> result [1] "2006-10-31 20:10:35 EST".
>   The problem is the variable start give me  "[1]  35  8 21 16 20 28 18  6
> 40 17 52 15 13 12 23 10 39 40" when the goal is is to keep the original
> format  2006-10-31 20:10:35 EST.
>
>  How solve this problem.
>
>
>   Thanks
>


-- 
Sarah Goslee
http://www.functionaldiversity.org



More information about the R-help mailing list