G'day Taka,
TM == Taka Matzmoto [EMAIL PROTECTED] writes:
TM and then assign the character vector to the numeric vector by
TM names-first.10
TM first.10 = numeric.vector
TM combined.one - cbind(names,first.10)
TM container - diag(10)
TM for (i in 1:(10*10))
I don't
BAT == Berwin A Turlach [EMAIL PROTECTED] writes:
TM == Taka Matzmoto [EMAIL PROTECTED] writes:
TM and then assign the character vector to the numeric vector by
TM names-first.10
TM first.10 = numeric.vector
TM combined.one - cbind(names,first.10)
TM container - diag(10)
Its not clear to me what format you want to put the data in but this
will read it into a list, one list element per lower triangular matrix.
Modify to suit.
DF - read.table(myfile.dat, fill = TRUE)
id - cumsum(is.na(DF[,2]))
result - by(DF, id, as.matrix)
# if the input is in the second format
Is this what you want? You can use 'scan' to read in and 'fill' out data in
a row.
x - scan('/temp/document1.txt', what=list(0, 0, 0, 0, 0), fill=T,
multi.line=F)
Read 15 records
x - do.call('rbind', x) # create a matrix
x
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9]
Hi R user
I need to read in some values from a computer program output.
I can't change the output format because the developer of the program
doesn't allow to change the format of output.
There are two formats.
First one looks like this
if I have 10 variables,