[R] function return output

threshold r.kozarski at gmail.com
Fri Jan 16 11:22:37 CET 2009


Hi, I wrote the function which outputs a matrix 'c' and a single value 'd',
as follows (simplified example):
procedure <- function(a,b){
...
list(c,d)
}
now I want to use 'c' and 'd' in code as follows:
d <- matrix(0,1,1)
value <- procedure(a,b)
and d[1,1] <- value[2] breaks telling that:
Error in d[1, 1] : incorrect number of dimensions
What I did wrong??, best, robert



-- 
View this message in context: http://www.nabble.com/function-return-output-tp21496413p21496413.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list