[R] save as ascii

2008-12-12 Thread Rina Oldager Miehs
Hello r-help I want to save my dataframe as an ascii file. a bit of my data frame: vmsrina[1:100,] CKRDYRNR CHRNR cowno dek lakt flow peakflow 1 3596600182 35966 182 9383 3.0527442 3.18 2 3596600182 35966 182 9393 1.8978755 3.06 3 3596600182 35966

[R] date translate in R from SAS

2008-11-05 Thread Rina Oldager Miehs
Hi My dataframe is imported from SAS as a csv file(which cant be any different). There is a vector dato that is dates like this: 03/12/2004 and that is *day/month/year*. vms[1:20,] CKRDYRNR RACE_IDdatofra minkaelvedato CHRNR cowno *dato* opstartdato muno

[R] for (i in...)

2007-12-09 Thread Rina Oldager Miehs
Hey do anyone know why this error occurs?? for(i in 1:n_trait){ +for( j in 1:n_trait){ +rG[i,j] - (G_o[i,j]/(sqrt(G_o[i,i]%*%G_o[j,j])) +rP[i,j] - (P_o[i,j]/(sqrt(P_o[i,i]%*%P_o[j,j])) Error: unexpected symbol in: rG[i,j] - (G_o[i,j]/(sqrt(G_o[i,i]%*%G_o[j,j])) rP rE[i,j]

[R] sorting dataframe

2007-11-21 Thread Rina Oldager Miehs
Hello We have a problem with sorting our dataframe... i have tried to write x - males[sort(males$index, decreasing=T),] But that just gives me x id sex BVgain BVmeat phenogain phenomeat index NANA NA NA NANANANA NA.1 NA NA NA NANA