Hi,
I don't understand why this doesn't work:
matTest <- matrix(nrow=3, ncol=3)
testMove <- function(I, J){
for(i in 1:I){
for(j in 1:J){
matTest[i, j] <- i+j
}
}
}
testMove(2, 3)
matTest
Why the elements of the matrix matTest are still NA? How could I fix it
Hi,
I would like to convert a character vector
xxx <- c("1/2", "1/4")
to
yyy <- c(0.5, 0.25)
, but as.numeric didn't work for me. Could anyone give me a hint please?
Thanks,
Ken
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/l
2 matches
Mail list logo