Not paying close attention to detail, I entered the equivalent of

pstr<-c("b1=200", "b2=50", "b3=0.3")

when what I wanted was

pnum<-c(b1=200, b2=50, b3=0.3)

There was a list thread in 2010 that shows how to deal with un-named vectors, 
but the same
lapply solution doesn't seem to work here i.e.,

pnum<-lapply(pstr, as.numeric)

or similar vapply version. The names and = signs seem to mess things up.

This is clearly not critical, but it would be nice to know an appropriate 
transformation.

JN

______________________________________________
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