Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the differences between help and ? and ?? in R language

Tags:

r

I want to find the instruction of a function of a R package, so I run help('pkg::name'). But I got the message saying 'no document for that'. I retried ??pkg:name and it returned a very short instruction. When it came to ?pkg:name, the full instructions showed up. What are the differences between ? and ?? and help()?

like image 851
Jie Avatar asked Jan 21 '26 10:01

Jie


1 Answers

You can read the help for "?":

> ?"?"

and the help for "??":

> ?"??"

in short, "?" finds the help for a single existing item, and "??" searches the help for some text. So "??random" searches for "random", and "?random" tries to find something called "random" (which doesn't exist so I get a message).

like image 112
Spacedman Avatar answered Jan 24 '26 05:01

Spacedman