[R] Aggregate by First case

2008-05-30 Thread Jojje Andersson
Hello! I have an maybe a to a simple question but I cant get it right. I have a dataframe with in one column an id-variable and in another a year-variable. One id-number can occur several years. I have sorted the dataframe on id then on year so the same id-number is sorted by year with the fi

Re: [R] Factor to numeric

2008-04-24 Thread Jojje Andersson
R] Factor to numeric> > > The decimal point in R is always '.', never ','.> > On Thu, 24 Apr 2008, > Jojje Andersson wrote:> > >> > Hello!> > I have a problem whith a data.frame. > I want to make a subset where some of the variabl

[R] Factor to numeric

2008-04-24 Thread Jojje Andersson
Hello! I have a problem whith a data.frame. I want to make a subset where some of the variables have values within ceartain limits. The variables are proportions like 1,00, 0,54, 0,00 etc. I don't get it right as R take the variables for factors. > ekobsub1 <- subset(ekob, PAP>0,25 & PAP<0,6

[R] time difference error

2007-10-30 Thread Jojje Andersson
Hello! I posted this question earlier but it seems that something went wrong, so I post it again. I have a problem making a new variabel in a dataframe that consists of a time difference. It seems that the new variable gets into the dataframe but I cant look at it anymoore. Here is what happens.

[R] time difference error

2007-10-29 Thread Jojje Andersson
Hello! I have a problem making a new variabel in a dataframe that consists of a time difference. It seems that the new variable gets into the dataframe but I cant look at it anymoore. Here is what hapens. > tdiff<- difftime(Kontrolltid, Starttid, units="auto")> tdiffTime differences > i