On 06.01.2010 03:14, Noli Sicad wrote:
Hi John
Thanks for your reply. I think I was posting properly the problem.
Here are the error, R script and console errors below.
Thanks. Noli
~~~
The error:
~~
Error in data.frame(CROP_ID = x[1, 1], CROPTYPE = x[1, 2], name =
colnames(x)[4:5],
Hi John
Thanks for your reply. I think I was posting properly the problem.
Here are the error, R script and console errors below.
Thanks. Noli
~~~
The error:
~~
Error in data.frame(CROP_ID = x[1, 1], CROPTYPE = x[1, 2], name =
colnames(x)[4:5], :
subscript out of bounds
~~~
I
Well, if nothing else, you have missing comma. :)
x01=y[,1]), x01=y[,1], x02=y[,2], x03=y[,3]
--
>
> fn <- function(x) {
> y <- t(x[,2])
> data.frame( Croptype=x[1,1], Period =x[1,2],
> name=colnames(x)[2],
> x01=y[,1])x01=y[,1], x02=y[,2], x03=y[,3] }
> <---Problem
> h
Hi,
forests <- read.csv("C:\\Down2\\R_forestmgt\\forest_cut-Age.csv")
m <- forests
fn <- function(x) {
y <- t(x[,2])
data.frame( Croptype=x[1,1], Period =x[1,2], name=colnames(x)[2],
x01=y[,1])x01=y[,1], x02=y[,2], x03=y[,3] } <---Problem
here
m <- do.call( "rbind", lapply(split
4 matches
Mail list logo