Dear R-Gurus, 

I have ended up with a calculation problem where I need to use brobs.
I have to work my way through a vector with a for loop to act on each
element in a calculation (refering to the previous
value in the new vector of results -- so as far as I know I can't use
"apply") -- this produces a list of brobs.

My problem is, how do I act on, plot this list, or do vector
calculations with the elements? From the other emails I have read there
does not 
seem to be a means of indexing a range of elements from a list.

library(Brobdingnag)
t<-c(as.brob(5), as.brob(6), as.brob(7), as.brob(8), as.brob(10))


> t
[[1]]
[1] +exp(1.6094)

[[2]]
[1] +exp(1.7918)

[[3]]
[1] +exp(1.9459)

[[4]]
[1] +exp(2.0794)

[[5]]
[1] +exp(2.3026)

> t[2:4]
[[1]]
[1] +exp(1.7918)

[[2]]
[1] +exp(1.9459)

[[3]]
[1] +exp(2.0794)


So if you try plotting that against another variable:

xval<-c(1,2,3,4,5)
plot(t,xval)

you get nothing useful.

Does anyone have some suggestions as to how to make this list of brobs
more useful? 
I thought cbind might help (cbind(t)) but that did not work.

Kind regards, 

Matt Redding

********************************DISCLAIMER**************...{{dropped:15}}

______________________________________________
R-help@r-project.org 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