Displaying 20 results from an estimated 30000 matches similar to: "how to get a primitive function object"
2009 Jan 21
1
getting caller's environment
Hello,
I'm writing a function like this:
f<-function(x,y,...) {
...
assign(x,y,envir=?)
}
I need the caller (of f) 's environment for the "?" so that the
assignment is done at the right place. To be specific, when the code
"f(x,1)" appears in environment A, I need the assignment of 1 to x
happen in environment A. So my question is how to get the correct
2009 Jan 23
1
overwriting '<-' and infinite recursions
Hello all,
I'm having a problem when overwriting the '<-' function and was told
I'd better post it here for help. The reason why I need to overwrite
it is complicated and not easy to tell in a few words; but this seems
the only clean option other than hacking R's core source code. My code
looks like:
# in .onLoad of a package; or if you want to test, put it in a function
2006 Oct 12
2
how to get the variance-covariance matrix/information of alpha and beta after fitting a GLMs?
Dear friends,
After fitting a generalized linear models ,i hope to get the variance of
alpha,variance of beta and their covariance, that is , the
variance-covariance matrix/information of alpha and beta , suppose *B* is
the object of GLMs, i use attributes(B) to look for the options ,but can't
find it, anybody knows how to get it?
> attributes(B)
$names
[1] "coefficients"
2007 Sep 13
2
handle dates in R?
Dear Rusers,
I have some data in .csv file like "2004-8-1" and "2004-10-1", and i need
to convert them into days from the origin (January 1, 1960).
I have tried the function date.mmddyyyy(), but cannot get it. Anybody can
show me how to handle the date data?
Thanks very much!
My dataset like:
time
2004-8-1
2004-10-1
2001-9-1
2002-9-1
--
With Kind Regards,
2008 Sep 23
3
Generating series of distributions with the same skewness and different kurtosis or with same kurtosis and different skewness?
Dear R users,
I hope to explain the concepts of skewness and kurtosis by generating
series of distributions with same skewness and different kurtosis or with
same kurtosis and different skewness, but it seems that i cannot find the
right functions.
I have searched the mailing list, but no answers were found.
Is it possible to do that in R? Which function could be used?
Thanks a lot.
--
2008 Jan 01
3
Specify a correct formula in R for Piecewise Linear Functions?
Dear all,
I have two variables, y and x. It seems that the relationship between them
is Piecewise Linear Functions. The cutpoint is 20. That is, when x<20, there
is a linear relationship between y and x; while x>=20, there is another
different linear relationship between them.
How can i specify their relationships in R correctly?
# glm(y~I(x<20)+I(x>=20),family = binomial, data =
2007 Oct 12
3
Anybody has ever met the problem to add a legend to a figure generated by image()?
Dear friends,
Anybody has ever met the problem to add a legend to a figure generated by
image()? I have three variables,x,y and z.
x and y are the coordinates, and z is the third values. we can use image(x,
y, z,...) to generate a figure according to the z-values, but the problem is
the figure legend. How can the legend be added to a figure generated
by image()? Note that filled.contour() can
2006 Nov 19
2
questions on adding reference line?
Dear Ruser,
I use abline() function to add the reference line successfully, but i
can't display the values corresponding to the reference line on the x/y
axis, anybody knows how to display it?
*My simulated programs:*
y<-rnorm(50)
plot(x,y)
abline(v=0.5) *#my question is how to display x=0.5 in the x axis?*
Thanks in advance.
--
With Kind Regards,
oooO:::::::::
(..):::::::::
2007 Oct 02
2
How to add legend for image()?
Dear friends,
The following is an example to explain my question. I want to get a
legend which will show the z-values according to different colors in image()
function.
x<-sort(runif(10)) #x-coordinates
y<-sort(runif(10)) #y-coordinates
z<-matrix(runif(100),nrow=10) #attributes values
image(x,y,z,col=gray((6:3)/6))
# legend(x,y,legend=z,col=gray((6:3)/6)) #error. the colors should
2007 Aug 17
3
Is there any good tools to facilitate us to create R functions?
Dear R users,
We have some programs for the specific task in our research, but they were
very commonly used. We want to make some functions for them, anybody can
recommend any good tools to facilitate us to create R functions even without
going deep into the theories of R functions ?
Any suggestions or help are greatly appreciated.
--
With Kind Regards,
oooO:::::::::
(..):::::::::
2007 Sep 17
2
What's the corresponding function in R for lo() function in S-PLUS?
Dear friends,
In S-PLUS, we can use the following argument, but not in R.
mode12 <- gam(score1 ~ lo(latitude) + lo(longitude))
I searched the help in S-PLUS, it says lo() Allows the user to specify a
Loess fit in a GAM formula, but i didn't find the correponding function in
R.
Anybody knows how to do the similar task in R?
Thanks very much.
--
With Kind Regards,
oooO:::::::::
2009 Feb 09
1
Where's code for binding values to formal arguments in functions?
Hello,
Can anyone give me a pointer where to find the implementation code for
binding values to formal arguments in functions? For example, if we
have a function f <- function(x,y)... and f(1,2) is called, I want to
find the code that binds 1 to x when evaluating f(1,2). I tried eval.c
but it's too long and I was lost... Thanks!
--
Yi
2007 Dec 31
2
help on ROC analysis
Dear all,
Some functions like 'ROC(Epi)' can be used to perform ROC analyssi, but it
needs us to specify the fitting model in the argument. Now i have got the
predicted p-values (0,1) for the 0/1 response variable using some other
approach, see the following example dataset:
id mark predict.pvalue
1 1 0.927
2 0 0.928
3 1 0.928
..................
2007 Nov 08
2
question on image() function?
Dear friends,
My dataset is like the following:
x y mcpvalue
0.4603578 0.6247629 1.001
0.4603715 0.6247788 1.001
0.4603852 0.6247948 1.001
0.4110561 0.5664841 0.995
The x and y variables are unsorted.
I use the function image(x,y,mcpvalue) to generate a plot, but the error
is that "increasing 'x' and
2007 Dec 13
1
Probelms on using gam(mgcv)
Dear all,
Following the help from gam(mgcv) help page, i tried to analyze my
dataset with all the default arguments. Unfortunately, it can't be run
successfully. I list the errors below.
#m.gam<-gam(mark~s(x,y)+s(lstday2004)+s(slope)+s(ndvi2004)+s(elevation)+s(disbinary),family=binomial(logit),data=point)
2006 May 25
3
How to limit bandwidth in iptables -- HELP
Hi,
Can anybody help me out, how to manage or limit bandwidth through
iptables while having internet connection on eth0 and working as a
gateway in LAN.
Thnaks in Advance.
Vikram
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
2011 Jul 18
1
Extract confidence intervals from rma object (metafor package)
Dear R-experts!
I am working on some meta-analysis using the metafor package. I would like
to extract values of the confidence intervals of the effect sizes of the
single studies from an rma object. Those values are printed out when
plotting a forest plot using the forest function on the rma object, however
I was not able to locate them.
Many thanks for your help!
Jokel
[[alternative HTML
2007 Jan 30
2
R and S-Plus got the different results of principal component analysis from SAS, why?
Dear Rusers,
I have met a difficult problem on explaining the differences of principal
component analysis(PCA) between R,S-PLUS and SAS/STATA/SPSS, which wasn't
met before.
Althought they have got the same eigenvalues, their coeffiecients were
different.
First, I list my results from R,S-PLUS and SAS/STATA/SPSS, and then show
the original dataset, hoping sb. to try and explain it.
2014 May 13
4
[LLVMdev] Problems in instrumentation
Hi everyone,
I have some trouble in instrumenting load instructions. I want to
instrument load instructions as follow: Firstly, I judge whether the loaded
pointer(*any type is possible*) is NULL. If so, I want to explicitly
allocate the corresponding address space of its type to the pointer.
For example, in source code level I want to translate the next statement
*p = 1;
into the next
2023 Jun 30
4
[PATCH v1 0/4] PCI/VGA: Improve the default VGA device selection
From: Sui Jingfeng <suijingfeng at loongson.cn>
Currently, the default VGA device selection is not perfect. Potential
problems are:
1) This function is a no-op on non-x86 architectures.
2) It does not take the PCI Bar may get relocated into consideration.
3) It is not effective for the PCI device without a dedicated VRAM Bar.
4) It is device-agnostic, thus it has to waste the effort to