I just tried it. > library <- "quantmod" > library [1] "quantmod" > typeof(library) [1] "character"
So how do I , or anyone , assign a string without " "? > library <- quantmod Error: object 'quantmod' not found What about this? > library <- c("quantmod") Does it do the job? Sorry if it has been asked. I'm still learning R. > > > On 29.04.2012 09:28, Indrajit Sengupta wrote: >> You don't need quotes in the library statement, you can just use >> library(parallel). > > Yes, a special (mis-)feature of library(). Since we are trying to teach > R here, we should provide clean R code. In an ideal world, we would be > able to say > > pkg <- "parallel" > library(pkg) > > doing the same as > > library("parallel") > > which is unfortunately not possible, because library(pkg) tries a > package called "pkg". > > Best, > Uwe Ligges > > > >> >> Regards, >> Indrajit >> >> >> >> ________________________________ >> From: Uwe Ligges<lig...@statistik.tu-dortmund.de> >> To: ya<xinxi...@163.com> >> Cc: r-help@r-project.org >> Sent: Saturday, April 28, 2012 11:57 PM >> Subject: Re: [R] "parallel" package >> >> >> >> On 28.04.2012 20:18, ya wrote: >>> Hi everyone, >>> >>> Anyone knows Where I can get the "parallel" package? The google results >>> said this package has been released since R 2.14, but I could not find >>> a >>> place to get it. >>> >>> I am doing a multiple imputation for missing values, it is really time >>> consuming. I figured maybe it's more efficient by paralleling my CPU. I >>> got an intel dual core i5 processor in a Thankpad x201 laptop. And I >>> have used install.packages ("parallel") in R 2.15 on both linux and >>> windows xp, no package installed. So maybe this package is not on cran? >>> Any idea? >> >> It is shipped as an R base packaage. Just use >> >> library("parallel") >> >> Uwe Ligges >> >> >>> Thank you very much. >>> >>> ya >>> >>> ______________________________________________ >>> 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. >> >> ______________________________________________ >> 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. > > ______________________________________________ > 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. > ______________________________________________ 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.