j*x 发帖数: 931 | 1 一个网上的package,下载之后,看到两个R Workspace的文件,一个Readme.txt,和其
它几个1kb的文件。click两个 R Workspace 的文件,R就运行了,根据readme里说的,
load了一个文件,然后就是">"符号。然后我就不知道怎么往下做了。
一个主要问题是,怎么才能看到code?作者说code就在package里面,但是我不知道怎么
找。
我之前只用R做一些简单工作,没有什么经验。
谢谢先。 |
l*********s 发帖数: 5409 | |
j*x 发帖数: 931 | 3 谢谢!看来可以看到里面有啥。就是不知道怎么才能看到。一打开就是到R的界面。
【在 l*********s 的大作中提到】 : 看看workspace里有啥呗
|
l*********s 发帖数: 5409 | |
j*x 发帖数: 931 | 5 After ls(), it shows a list of xxx.xxx file. The package is not from the
usual R library. The usual help(""), library("") don't work. How can I see
the source code, and how to check variables of a specific function?
I am searching online as well. Had some progress but not good enough for me
to put hands on.
Thanks again! Bao-Zi later. |
a***d 发帖数: 336 | 6 try search() first to see if the package is loaded. if the package is loaded
, and say as the 2nd package, then do ls(2), you will see the functions in
the package.
me
【在 j*x 的大作中提到】 : After ls(), it shows a list of xxx.xxx file. The package is not from the : usual R library. The usual help(""), library("") don't work. How can I see : the source code, and how to check variables of a specific function? : I am searching online as well. Had some progress but not good enough for me : to put hands on. : Thanks again! Bao-Zi later.
|
j*x 发帖数: 931 | 7 I first loaded the package. Then I typed ls() and there were a list of xxx.
xxx shown. I don't know what they are but assume they are functions.
I tried search(), the packaged just loaded was not listed there. The package
is an applied package written by an author of a paper. So it is not
included in the R library. How can I get any help of these functions? The
author suggested using help and check the source code. However, I can not
find them. I think it is a real 菜鸟 question, but when one doesn't get it,
it's just hard.
Thank you a lot for taking the time replying. |
a***d 发帖数: 336 | 8 if it is not in the search path, I don't think the package is properly
loaded... R can only find functions in the search path.. something's wrong..
xxx.
package
,
【在 j*x 的大作中提到】 : I first loaded the package. Then I typed ls() and there were a list of xxx. : xxx shown. I don't know what they are but assume they are functions. : I tried search(), the packaged just loaded was not listed there. The package : is an applied package written by an author of a paper. So it is not : included in the R library. How can I get any help of these functions? The : author suggested using help and check the source code. However, I can not : find them. I think it is a real 菜鸟 question, but when one doesn't get it, : it's just hard. : Thank you a lot for taking the time replying.
|
a***d 发帖数: 336 | 9 if you believe the package is loaded, just check into whatever is in the
search path that is not a package loaded by default.
..
【在 a***d 的大作中提到】 : if it is not in the search path, I don't think the package is properly : loaded... R can only find functions in the search path.. something's wrong.. : : xxx. : package : ,
|
a***d 发帖数: 336 | 10 if you can see xxx.xxx, and those are the functions you need, just type xxx.
xxx in the command line. This works for some functions. to see the
parameters of the functions, try args(functionName).
me
【在 j*x 的大作中提到】 : After ls(), it shows a list of xxx.xxx file. The package is not from the : usual R library. The usual help(""), library("") don't work. How can I see : the source code, and how to check variables of a specific function? : I am searching online as well. Had some progress but not good enough for me : to put hands on. : Thanks again! Bao-Zi later.
|
l*********s 发帖数: 5409 | 11 which package are you talking about? |
j*x 发帖数: 931 | 12 The package is to test whether two sharpe ratios are the same. It's in
http://www.econ.uzh.ch/faculty/wolf/publications.html#7
under Robust performance hypothesis testing with the Sharpe ratio.
What I want is: given two sets of data, test if they have the same Sharpe
ratio.
I followed what aloud said and got the arguments of some functions. I think
it will be a good start.
Thank you, littlebirds and aloud. 10 bao-zi have been sent. I am not that
rich. :)
There are maybe more questions coming later. Hope you could help again.
Thanks and Happy Holidays. |
l*********s 发帖数: 5409 | 13 load the workspace into a clean session, and ls() to list the data and
functions within the workspace.
To read the source code of a particular function, simply type its name.
think
【在 j*x 的大作中提到】 : The package is to test whether two sharpe ratios are the same. It's in : http://www.econ.uzh.ch/faculty/wolf/publications.html#7 : under Robust performance hypothesis testing with the Sharpe ratio. : What I want is: given two sets of data, test if they have the same Sharpe : ratio. : I followed what aloud said and got the arguments of some functions. I think : it will be a good start. : Thank you, littlebirds and aloud. 10 bao-zi have been sent. I am not that : rich. :) : There are maybe more questions coming later. Hope you could help again.
|
j*x 发帖数: 931 | 14 Yes, I got the source codes now. Thank you! |