[R] converting factor to numeric gives "NAs introduced by coercion"

2011-07-29 Thread anglor
Hi, I have a dataframe that I imported from a .txt file by: skogTemp <- read.delim2("Skogaryd_shoot_data.txt", header=TRUE, fill=TRUE) and the data are factors, how can avoid factors from the beginning? Although the file contains both characters and numbers. I tried to convert some of the colum

Re: [R] order a data frame after date and hour

2011-07-29 Thread anglor
Thanks for a patient reply... I feel really stupid about this other problem dput(). What I didn't understand is how I can make the same thing with my data. You use rnorm and rpois which generates random poisson ditribution and normal distribution purhaps just to create a data.frame? Should I just

Re: [R] order a data frame after date and hour

2011-07-29 Thread anglor
Hi, thank you for the reply! I'm sorry I added so little information. I thought DateHour was a character class but it was a factor. So I converted to character and order worked as you described. For this time I only wanted to convert DateHour to a number because I thought I had to do that in or

[R] order a data frame after date and hour

2011-07-28 Thread anglor
Hi, I've got a dataframe looking like this: DateHour TcuvInt.A TcuvInt.B TcuvInt.C 1757 2007-03-15 14:00:007.83 1758 2007-03-15 14:30:00 7.42 7.69 1759 2007-03-15 15:00:00 7.53 7.75 1760 2007-03-15 15:30:00 7.65 7.73

Re: [R] Reorganize data fram

2011-07-15 Thread anglor
Thank you! I used this one and it worked really great. /Angelica -- View this message in context: http://r.789695.n4.nabble.com/Reorganize-data-fram-tp3662123p3669782.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project

Re: [R] Reorganize data fram

2011-07-15 Thread anglor
Hi, thanks for your reply. I didn't get cast() to work and didn't know how to find information about it either. I used reshape but then I had to subset only those columns (actually I have 28 columns of other data) Could cast or reshape work also with more columns? Angelica -- View this messag

[R] Reorganize data fram

2011-07-12 Thread anglor
Hi, I have a data frame of about 700 000 rows which look something like this: DateTemperature Category 2007102 16 A 2007102 17 B 2007102 18 C but need it to be: Date TemperatureA TemperatureB TemperatureC 2007102