Julia 相当于 R 的 ??(双问号 help.search 所有包) [英] Julia's equivalent to R's ?? (double question-mark help.search across all packages)
问题描述
在 R
中,您可以通过
在 RStudio
中,页面在 IDE 中打开.
help() 函数和 ?R 中的帮助运算符提供对R 函数、数据集和其他对象的文档页面,标准 R 发行版中的包和贡献的包包.
help() 函数和 ?仅当您已经知道要使用的函数的名称时,运算符才有用.其他搜索方式包括 apropos
和 ??
apropos() 函数搜索对象,包括函数,在当前 R 会话中可直接访问,其名称为包含一个指定的字符串.
<块引用>
??运算符是 help.search() 的同义词.help.search()功能扫描安装在您的软件包的文档图书馆.help.search() 的参数是字符串或正则表达式.
附:我打算回答我自己的问题.
Julia 也有类似的
help?>first
如果您搜索字符串,则忽略大小写.如果要在 DataFrames
模块中进行搜索,请在搜索前输入 using DataFrames
.
这也适用于 Visual Studio Code
和 Atom
:
In R
you can search the documentation by typing a question mark ?
or a double question mark ??
. How do you search the manual for strings in the Julia REPL?
>?first
No documentation for ‘first’ in specified packages and libraries:
you could try ‘??first’
>??first
In the R
console a browser window opens up:
In RStudio
the page is opened within the IDE.
The help() function and ? help operator in R provide access to the documentation pages for R functions, data sets, and other objects, both for packages in the standard R distribution and for contributed packages.
The help() function and ? operator are useful only if you already know the name of the function that you wish to use. Other ways to search include apropos
and ??
The apropos() function searches for objects, including functions, directly accessible in the current R session that have names that include a specified character string.
The ?? operator is a synonym for help.search(). The help.search() function scans the documentation for packages installed in your library. The argument to help.search() is a character string or regular expression.
P.S. I intend to answer my own question.
Julia has similar interactive utilties. Julia's main search utility for docstrings is named apropos
.
To search the documentation for information about "first" in Julia, you have apropos("first")
or equivalently ?"first"
. Thus ?"first"
is roughly equivalent to R
's ??
.
To search for functions and methods, you can type a singe question mark ?
, just as with R
. In the Julia REPL, as you type the question mark, the prompt changes to a question mark. If you type "first"
it searches through strings, while if you type first
without quote-marks, you get a search over variables exported by the modules currently loaded.
Illustration:
help?>"first"
# or equivalently:
julia>apropos("first")
help?>first
If you search for a string, case is ignored. If you want to search within the DataFrames
module, type using DataFrames
before searching.
This also works in Visual Studio Code
and Atom
:
这篇关于Julia 相当于 R 的 ??(双问号 help.search 所有包)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!