How do I open R help about a symbol or punctuation mark like ( parenthesis or [ bracket?
[This article was first published on isomorphismes, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
A question I’ve googled before without success. Hopefully this answer will show up for someone who needs it. I’ll also go over the better-known uses of ? just in case.
- To get help in
Rabout a function likesubsetyou type?subset. That’s likeman subsetfrom the command line. - If you only know roughly what you’re looking for use double question marks: so
??nonlinearwill lead to the packagenlme. That’s likeaproposon the command line. - To get a package overview, type
?xts::xts. There does not exist?xtshelp. Packages that don’t have?twitteR::twitteRyou will need to use??twitteRto find the help pages on?twitteR::status-class,?twitteR::dmGet, etc. - Finally, the question of the title. To get R help on punctuation such as
(,{,[,`,::,...,+, and yes, even on?itself, use single quotes to ‘escape’ the meaningful symbol. Examples follow:?'`'?'('?'['?'...'?'+'?'%*%'?'%x%'?'%o%'?'%%'?'%/%'?'$'?'^'?'~'?'<-'?'='?'<<-'
To leave a comment for the author, please follow the link and comment on their blog: isomorphismes.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.