Re: [R] Using R to Compute Covariance

2014-07-26 Thread Robert Sherry
David, Thanks for the response. I believe you have solved my problem. Bob On 7/26/2014 3:50 PM, David Winsemius wrote: On Jul 26, 2014, at 11:07 AM, Robert Sherry wrote: I have the following data set: xy p 11 1/2 22 1/4 39 1/4 In this ca

Re: [R] Function assignment

2014-07-26 Thread peter dalgaard
On 26 Jul 2014, at 17:01 , Jeff Newmiller wrote: > What an awful idea... that would lead to incredibly hard-to-debug programs. > No, you cannot do that. What kind of problem has led you to want such a > capability? Perhaps we can suggest a simpler way to think about your problem. I agree that

Re: [R] Using R to Compute Covariance

2014-07-26 Thread David Winsemius
On Jul 26, 2014, at 11:07 AM, Robert Sherry wrote: I have the following data set: xy p 11 1/2 22 1/4 39 1/4 In this case, p represents the probability of the values occurring. I compute the covariance of x and y by hand and come up with a va

Re: [R] Using R to Compute Covariance

2014-07-26 Thread peter dalgaard
The Details section of ?cov.wt tells you that its divisor is not (n-1) for the "unbiased" method. Or rather, it tells you what it does, and that that amounts to dividing by n-1 _if_ the weights are equal. (I never quite figured out under which sampling/weighting model this estimator is actuall

Re: [R] Function assignment

2014-07-26 Thread MacQueen, Don
Here is one way: foo <- function(tmp) assign( tmp, tmp , '.GlobalEnv') > foo('ick') > ick [1] "ick" Note that you must only use it with a character argument: > foo(1) Error in assign(tmp, tmp, ".GlobalEnv") : invalid first argument Be warned also that assign() should be used very carefully,

[R] Using R to Compute Covariance

2014-07-26 Thread Robert Sherry
I have the following data set: xy p 11 1/2 22 1/4 39 1/4 In this case, p represents the probability of the values occurring. I compute the covariance of x and y by hand and come up with a value of 41/16. When computing the covariance, I am divi

Re: [R] Redefining reference class makes persistent object partly unreadable

2014-07-26 Thread Jeff Newmiller
This doesn't surprise me, but then I am not a fan of reference classes. The obvious (to me) answer is to read the objects with the old code and convert them to the new format on the fly or save the data in a more neutral format like csv or json for later use.

Re: [R] R and external C library " cannot open shared object file" while LD_LIBRARY_PATH is set

2014-07-26 Thread John McKown
OOPS, I forgot to even look at something. Have you looked at the command: R CMD SHLIB ?? The documentation says: $R CMD SHLIB --help Usage: R CMD SHLIB [options] files | linker options Build a shared object for dynamic loading from the specified source or object files (which are automagically m

Re: [R] Function assignment

2014-07-26 Thread Jeff Newmiller
What an awful idea... that would lead to incredibly hard-to-debug programs. No, you cannot do that. What kind of problem has led you to want such a capability? Perhaps we can suggest a simpler way to think about your problem. ---

Re: [R] R and external C library " cannot open shared object file" while LD_LIBRARY_PATH is set

2014-07-26 Thread John McKown
On Fri, Jul 25, 2014 at 9:07 AM, Pierre Lindenbaum wrote: > ( cross-posted on SO: http://stackoverflow.com/questions/24955829/ ) > > I'm building a C extension for R, this library also uses the HDF5 library. > > I compiled a dynamic library (gcc flags: -fPIC -shared -Wl,-soname,libmy.so I am not

Re: [R] Determine all specific same dates between two given dates

2014-07-26 Thread Uwe Ligges
On 25.07.2014 18:26, Frank S. wrote: Hi everyone, After trying to find the solution during days, I decided to write in this help list in order to ask if anyone can help me.I would want to construct an R function, with "initial", "final" and "specific" dates as 3 arguments (for example, becau

Re: [R] Fwd: Need help in finding ppval function and xirr function of matlab in R

2014-07-26 Thread Uwe Ligges
On 25.07.2014 15:24, Sowmya Rudregowda wrote: Hi, I am new to R language.Am writing matlab calculations in R language. I am searching for functions in R which are equivalent to matlab. So, i am not finding equivalent ppval() and xirr() of matlab in R. And most of us are new to matlab and do

[R] Multiple imputation, multinomial response & random effects

2014-07-26 Thread garrett honke
Hi all, not sure if you are still having this problem but check out my post on crossvalidated, http://stats.stackexchange.com/questions/109261/conducting-multi-level-regression-on-ordinal-dvs-with-imputed-data-in-r/109262#109262 [[alternative HTML version deleted]] ___

[R] Function assignment

2014-07-26 Thread Florian Ryan
Hello, I would like to use the variable name which i assign the return value of a function in a function. Is that possible? e.g. foo <- function(){ some not to me known R magic } myVariableName <- foo() myVariableName [1] "myVariableName" Hope someone can help me. Thanks Florian [

[R] Determine all specific same dates between two given dates

2014-07-26 Thread Frank S.
Hi everyone, After trying to find the solution during days, I decided to write in this help list in order to ask if anyone can help me.I would want to construct an R function, with "initial", "final" and "specific" dates as 3 arguments (for example, becauseI'm not really sure it is the best wa

[R] selection of probes, probesets mapping to the same gene

2014-07-26 Thread carol white
Hi, Apart from genefilter, is there any other packages that find all probes, probesets mappign to the same gene and then, select the one based on criterion for ex largest value of the test statistic? Look forward to your reply, Carol [[alternative HTML version deleted]] ___

[R] R and external C library " cannot open shared object file" while LD_LIBRARY_PATH is set

2014-07-26 Thread Pierre Lindenbaum
( cross-posted on SO: http://stackoverflow.com/questions/24955829/ ) I'm building a C extension for R, this library also uses the HDF5 library. I compiled a dynamic library (gcc flags: -fPIC -shared -Wl,-soname,libmy.so -o ../lib/libmy.so in a 'lib' directory: $ file /path/to/my/lib/libmy.so

[R] Fwd: Need help in finding ppval function and xirr function of matlab in R

2014-07-26 Thread Sowmya Rudregowda
Hi, I am new to R language.Am writing matlab calculations in R language. I am searching for functions in R which are equivalent to matlab. So, i am not finding equivalent ppval() and xirr() of matlab in R. Please help me in finding the functions. Thank you SowmyaR [[alternative HTML ver

[R] Reproducibility issue in gbm (32 vs 64 bit)

2014-07-26 Thread Bruce.W Morlan
Absolutely, even though the seed means the random number sequence starts in the same place, the sequence generated will certainly drift in different directions on different precision machines. -- Information (and analysis) is power, and I am all about Power to the People. [[alternative H

Re: [R] Plotrix and twoord.plot with date on x-axe

2014-07-26 Thread Arnaud Michel
Perfect Jim, It's fine ! Thank you Michel Le 26/07/2014 12:16, Jim Lemon a écrit : On Sat, 26 Jul 2014 09:36:49 AM Arnaud Michel wrote: Hello With package plotrix and twoord.plot function, I would like to put the labels of the ticks values of x-axe which are date ( c("2006 Jan", "2007 Jan", "

Re: [R] Plotrix and twoord.plot with date on x-axe

2014-07-26 Thread Arnaud Michel
Perfect Jim, It's fine ! Michel Le 26/07/2014 12:16, Jim Lemon a écrit : On Sat, 26 Jul 2014 09:36:49 AM Arnaud Michel wrote: Hello With package plotrix and twoord.plot function, I would like to put the labels of the ticks values of x-axe which are date ( c("2006 Jan", "2007 Jan", "2008 Jan",

Re: [R] Plotrix and twoord.plot with date on x-axe

2014-07-26 Thread Jim Lemon
On Sat, 26 Jul 2014 09:36:49 AM Arnaud Michel wrote: > Hello > > With package plotrix and twoord.plot function, I would like to put the > labels of the ticks values of x-axe which are date ( > c("2006 Jan", "2007 Jan", "2008 Jan", "2009 Jan", "2010 Jan", "2011 > Jan", "2012 Jan") with if possible

[R] Plotrix and twoord.plot with date on x-axe

2014-07-26 Thread Arnaud Michel
Hello With package plotrix and twoord.plot function, I would like to put the labels of the ticks values of x-axe which are date ( c("2006 Jan", "2007 Jan", "2008 Jan", "2009 Jan", "2010 Jan", "2011 Jan", "2012 Jan") with if possible, the angle of labels and x-axe = 40 Any idea ? Thank you fo