Hello everyone,
I am using the following program to get the p-value of some numbers
(column 'LR' of the data.dat file). I want to write the 1st and 2nd
column of the output file (data.out) as an integer while the program
change them to double. Could anybody please tell me how I can write
the code which writes the values of the first two columns as integer?
Thanks


library ('MASS')
MP<-read.table(file='data.dat')
names(MP)<-c('B','R','S','L','LR','Q')
a<-as.matrix((1-pchisq(MP$LR, df=1)))
b<-cbind(MP$B,MP$R,a,MP$S,MP$L,MP$LR,MP$Q)
write.matrix(b,'data.out')

______________________________________________
R-help@stat.math.ethz.ch 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.

Reply via email to