Displaying 20 results from an estimated 10000 matches similar to: "Referencing function name from within function"
2005 Apr 19
3
Ranking within a classification variable.
Suppose I have a data frame with two columns ``district'' and
``score'' --- score is numeric; district may be considered
categorical.
I wish to append to this data frame a third column whose entries are
the ranks of ``score'' ***within*** district.
I've tried fiddling about with tapply() and by() but the result is a
list whose i-th component consists of the ranks of
2007 Apr 19
4
hello
ok how can I do to cancel le function factor for the moment ican't do this and I'm stuck with my problem for exemple
Id_Rep Id_Geno Val_O Id_TrT1
1 1 64238 145 2
2 1 64238 1 1
3 1 64238 2 1
4 1 64238 1 1
5 1 64238 1 1
6 1 64238 2 1
7 1 64238 1 1
8 2
2006 Nov 25
3
OT: P(Z <= -1.46).
In checking over the solutions to some homework that I had assigned I
observed the fact that in R (version 2.4.0) pnorm(-1.46) gives
0.07214504. The tables in the text book that I am using for the
course give the probability as 0.0722.
Fascinated, I scanned through 5 or 6 other text books (amongst the
dozens of freebies from publishers that lurk on my shelf) and found
that some agree with R
2002 Apr 04
1
PR#1132.
Just now I again had occasion to want nested describe lists in a
documentation file. I found that the bug which I reported on 18
October, 2001 still persists. I checked on the bug report at the R
web page, and found that the notes say ``Not a problem in R 1.4.0
(2001-12-08)''.
Well, it's still a problem for me --- using R 1.4.1.
(Details:
platform sparc-sun-solaris2.7
arch
2006 Oct 02
3
How can I generate this numbers
Hi wizards, I need to know how can I generate this numbers
I have n numbers N1,N2 , Nn , but Nn = 1- sum(N1+N2+...+Nn-1) and
sum(N1+N2+..Nn)=1
and N1,N2,..Nn with 0<N<1 .
Does somebody know how to generate it ? Some distribution or algorithm.
Thanks in advance.
--
Web Page
http://www.geocities.com/ricardo_rios_sv/index.html
2006 May 17
3
Off topic --- help in locating a source.
Apologies for the off-topic question; as usual I'm trying to draw
upon the unparalleled knowledge and sagacity of the r-help list.
Please reply off-list if you can help me out.
A collaborator of mine found a formula we need, on sheets which he had
photocopied out of a book, some years ago. He cannot remember which
book (he's getting to be as senile and forgetful as I am, poor
bloke!).
2004 Jul 06
2
Re: errors in randomization test
Colin Bleay wrote:
> last week i sent an e-mail about dealing with errors thrown up from a
> glm.nb model carried out on multiple random datasets.
>
> every so often a dataset is created which results in the following error
> after a call to glm.nb:
>
> "Error: NA/NaN/Inf in foreign function call (arg 1)
> In addition: Warning message:
> Step size truncated due
2005 Jun 02
2
Caution on the use of model.matrix.
I have just been bitten by a quirk in the behaviour of model.matrix.
I used model.matrix inside a function, and passed to it a formula
that was built elsewhere.
The formula was of the form ``y ~ x + w + z''. Now, model.matrix
cheerfully accepts formulae of this form, although it only
***needs*** the right hand side, i.e. ``~ x + w + z'' --- the ``y''
can be dropped (but
2001 Oct 01
1
Graceful exit from fortran.
Is there a way to exit gracefully from dynamically loaded Fortran,
(several layers down), if an error condition is detected?
I.e. suppose I'm within a subroutine called by a subroutine, ...,
called by .Fortran(); I want to give up gracefully if an error
condition is detected.
If I say something like
if(x .gt. 42.d0) stop
then indeed everything stops, i.e. R falls over. I'd
2004 Mar 01
6
How to plot Histogram with frequence overlaid by distribution curve
Hi,
I am facing the problem that I want to plot a histogram chart set
freq to true and overlay with normal or weibull or exponential distribution
curve.
The sample code is shown as below:
>samp<-c(-8.2262,-8.2262,-8.2262,-8.20209,-8.09294,-8.07321,-8.07321,
-8.07321,-8.07175,-8.04948,-8.04948,-8.04948,-8.03848,-8.03848,
2004 Aug 26
1
how to make lines() meet axis in autoscaled coordinate system?
Hello,
I have an auto-scaled coordinate system and would like to add some
clarifying lines to the graph - which ares supposed to meet the axis.
>lines(c(0,time1,time1), c(1,1,0),lty=3)
does what I want, BUT the second leg does not touch the x-axis since the
auto-scaling of the y-axis does not start at'0' but slightly negative.
I could now adjust the line length by 'trial and
2005 Jul 19
2
Obtaining argument name within a function
Dear all
How can I obtain the name of the argument passed in a function? Here is a
simplistic example of what I would like to obtain:
myfunction= function(name) {
print(paste("The parameter name was",unknownFunction(name))
}
myfunction(myobject)
[1] "The parameter name was myobject"
Thanks
Francisco
2006 May 29
2
newbie question: ROW average
Dimitris Rizopoulos wrote:
> look at ?rowMeans; you can also use "apply(mat, 1, mean)" but
> rowMeans() is better.
By my reading of the question, this is not what
Ezhil wants. He said:
``I have a 992 x 74 matrix. I would like to form a new matrix
by averaging each 4 rows from the original one.''
I.e. he wants (I think) the first row of the new matrix
to be the
2004 Nov 15
3
glim in R?
After some futile searches, I decided to ask the list to see
if any of the sages out there would have an answer:
I have a function I wrote a few years ago in S, which calls
glim numerous times. I'd like to port it to R, but glm
works differently from glim, which takes as part of its
input an X design matrix. I probably could write a function
to convert glim to glm, but hope this
2004 Sep 15
2
Slightly off-topic --- distribution name.
I've built R functions to ``effect'' a particular distribution, and
would like to find out if that distribution is already ``known'' by
an existing name. (I.e. suppose it were called the ``Melvin''
distribution --- I've built dmelvin, pmelvin, qmelvin, and rmelvin as
it were, but I need a real name to substitute for melvin.)
The distribution is really just a toy
2007 Apr 24
1
regarding 3d Bar Plot --- correction.
I mis-spoke. It seems I had two collections of functions in the same
directory. One by Colin Goodall, and one by David Scott (I have no
record of where he is/was located). It is the *latter* collection
that does all its work from within Fortran.
I'll have another look at what Colin Goodall actually wrote to see if
it could be useful to guarav.
cheers,
Rolf Turner
rolf at
2004 May 12
4
missing values imputation
What R functionnalities are there to do missing values imputation (substantial proportion of missing data)?
I would prefer to use maximum likelihood methods ; is the EM algorithm implemented? in which package?
Thanks
Anne
----------------------------------------------------
Anne Piotet
Tel: +41 79 359 83 32 (mobile)
Email: anne.piotet@m-td.com
2009 Oct 20
2
Problem using the source-function within R-functions
Dear R community,
You may have the solution to how to construct a function using the function
"source()" to build the function; i.e.
myfunction <- function(...){
source('file1.r')
source('file2.r')
}
After compiling and installing the "myfunction" in R, then calling the
"myfunction" gives an error because the content of 'file1.r' and
2004 Feb 15
4
father and son heights
Faraway's book titled "Practical Regression and Anova using R",
with full text available online at:
http://cran.r-project.org/doc/contrib/Faraway-PRA.pdf
refers to a data set, stat500, which compares midterm and final
grades. It can be used to illustrate similar concepts.
A google search for faraway.zip will locate the actual data.
---
Date: Sun, 15 Feb 2004 10:37:08 -0800
2001 Sep 05
4
Command line editing.
I've looked through the FAQ and can't find anything about
this.
I'm working on a Sun machine, running Solaris 2.7.
I'm a new R-user; have been using Splus for millenia, and finally
decided it was time I got going with R. So I downloaded R, installed
it, fiddled about a bit, and found that command-line editing was
absent.
Scrounging through the documentation some more, I saw it