Good Afternoon, ?? I have a small problem with the following code. # The x.sub$Time[[1]] 2006-10-31 19:03:01 EST # when put in variable star give-me star<-x.sub$Time[[1]] print(star) print(x.sub$Time[[1]]) [1] 1 36 32 -........ do not understand why -- View this message in context: http://r.789695.n4.nabble.com/problem-with-data-tp4453510p4453510.html Sent from the R help mailing list archive at Nabble.com.
Perhaps you should dput() you data so this is reproducible... Michael On Wed, Mar 7, 2012 at 10:15 AM, RMSOPS <ricardosousa2000 at clix.pt> wrote:> Good Afternoon, > > ?? I have a small problem with the following code. > > # The x.sub$Time[[1]] ?2006-10-31 19:03:01 EST > > # when put in variable star give-me > star<-x.sub$Time[[1]] > print(star) > print(x.sub$Time[[1]]) > ?[1] ?1 36 32 ?-........ > > > do not understand why > > > -- > View this message in context: http://r.789695.n4.nabble.com/problem-with-data-tp4453510p4453510.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
> Good Afternoon, > > I have a small problem with the following code. > > # The x.sub$Time[[1]] 2006-10-31 19:03:01 EST > > # when put in variable star give-me > star<-x.sub$Time[[1]] > print(star) > print(x.sub$Time[[1]]) > [1] 1 36 32 -........ > > > do not understand whyWhy what? Without exact info what is x.sub$Time there is not much to tell about its printing method. Regards Petr> > > -- > View this message in context:http://r.789695.n4.nabble.com/problem-with-> data-tp4453510p4453510.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.
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 -- View this message in context: http://r.789695.n4.nabble.com/problem-with-data-tp4453510p4455978.html Sent from the R help mailing list archive at Nabble.com.
dput(x.sub) so we can see what you really have. Michael 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 > > > > -- > View this message in context: http://r.789695.n4.nabble.com/problem-with-data-tp4453510p4455978.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.