Displaying 20 results from an estimated 1000 matches similar to: "for() to lapply()"
2010 Nov 08
3
Help with getting ?match to not sort
Hello all,
I think I am missing something about the sorting parameter in the "match"
command/
Here is an example:
a1 <- data.frame(name = c("D", "B", "C", "A", "A", "C"))
a2 <- data.frame(name = c("A", "B", "C", "D"), num = 1:4)
a1
a2
merge(a1, a2, sort = F, by.x = T)
The
2002 Aug 12
5
programming in R
I have a probably basic problem concerning the R language.
I will write some small R programs but don't really know how to start. Do I have
to create my files in some editor like emacs or can I write my code in the R
prompt? How to compile the code?
I haven't found any good manual parts about this subject.
regards
A.P
2010 Jan 13
4
merging issue.........
hi, I have a question about merging two files.
For example, I have two files, the first file is like the following:
id trait1
1 10.2
2 11.1
3 9.7
6 10.2
7 8.9
10 9.7
11 10.2
The second file is like the following:
id trait2
1 9.8
2 10.8
4 7.8
5 9.8
6 10.1
12 10.2
13 10.1
now I want to merge the two files by the variable "id", I only want
2010 Jun 23
1
Probabilities from survfit.coxph:
Hello:
In the example below (or for a censored data) using survfit.coxph, can
anyone point me to a link or a pdf as to how the probabilities appearing in
bold under "summary(pred$surv)" are calculated? Do these represent
acumulative probability distribution in time (not including censored time)?
Thanks very much,
parmee
*fit <- coxph(Surv(futime, fustat) ~ age, data = ovarian)*
2002 Mar 19
3
Re: Problems with rgl package
I also downloaded the rgl package (after reading recent Uwe Ligges' post)
and installed in on my Win2k Pro sp2 machine. It seems to work with no
problems. I ran most of the examples, including the hist3d one, and all of
them worked fine.
A couple of thoughts. I have administrative priviliges on my machine.
Could this possible make a difference. The rgl library uses OpenGL. Is it
a
2000 Dec 14
1
Sort in descending order
Hi R users:
I want to know how can I easily sort in descending order a
whole data frame by one or several variables.
Thank you very much for your help.
Kenneth Cabrera
krcabrer at perseus.unalmed.edu.co
krcabrer at epm.net.co
Universidad Nacional de Colombia, Sede Medell?n
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2004 Oct 08
1
Chernoff faces
> >>>>> "Kenneth" == Kenneth Cabrera <krcabrer at perseus.unalmed.edu.co> writes:
>
> Kenneth> Hello everybody: Does any one has a function to build Chernoff
> Kenneth> faces?
>
> Many of us don't think it's worth them.
> But we know that opinions differ and gladly incorporate
> (good quality) submissions of source code.
>
2001 Jun 07
3
Diag "Hat" matrix
Hi R users:
What is the difference between in the computation of the diag of the
"hat" matrix in:
"lm.influence" and the matrix operations with "solve()" and "t()"?
I mean, this is my X matrix
x1 x2 x3 x4 x5
[1,] 0.297 0.310 0.290 0.220 0.1560
[2,] 0.360 0.390 0.369 0.297 0.2050
[3,] 0.075 0.058 0.047 0.034 0.0230
[4,] 0.114 0.100
2000 Dec 20
1
Partial table.
Hi R users:
Thank you very much for you help, you are very kind.
I am again asking for your help to make a function that returns the
numbers of elements of each category given in another vector.
I mean, I have a vector "x" with several elements (most of them
more that once) and other vector "y" with the elements that I want
to count in the first vector (is not a exhaustive
2002 Jul 26
1
Frame o windows result.
This can be accomplished with the front-end "Emacs" / "ESS".
http://cran.r-project.org/doc/FAQ/R-FAQ.html#R%20and%20Emacs
-----Original Message-----
From: Kenneth Cabrera [mailto:krcabrer at perseus.unalmed.edu.co]
Sent: 26 July 2002 15:30
To: r-help at stat.math.ethz.ch
Subject: [R] Frame o windows result.
Helllo Dear R-user!
I want to know how can I open and other text
2002 Nov 06
2
Re: some questions!
Hi,
I'm also cc'ing it to r-help.
On Wed, 6 Nov 2002, Kenneth Cabrera wrote:
> Date: Wed, 06 Nov 2002 10:09:21 -0500
> From: Kenneth Cabrera <krcabrer at perseus.unalmed.edu.co>
> To: kwan022 at stat.auckland.ac.nz
> Subject: some questions!
>
> Hello Dear Ko-Kang Wang:
>
> I am trying to compile R v 1.6.1 .
>
> I am following the
2009 Dec 03
1
Acumulate assign on lapply list
Hi R users:
f1<-function(l1,idx){
f2<-function(i,l1) l1[[i+1]]<<-c(l1[[i]],l1[[i+1]][-1])
lapply(idx,f2,l1)
return(l1)
}
l<-list(c(1,2,3),c(4,5),c(6,7,8))
l2<-f1(l,1:(length(l)-1))
l2
I got:
[[1]]
[1] 1 2 3
[[2]]
[1] 1 2 3 5
[[3]]
[1] 4 5 7 8
But what I want in the last position of l2 is the acummualte of the
assignations...
I would like to have:
[[1]]
[1] 1 2
2001 Mar 10
1
Bug in qchisq?
Hello developers and users:
My system fails (the computer freezes) when I use the ncp parameter,
with the lower.tail=FALSE option in the qchisq function.
qchisq(0.025,31,ncp=1,lower.tail=FALSE)
Thank you very much for your help.
Kenneth Cabrera
Universidad Nacional de Colombia
ICNE
Sede Medellin
krcabrer at perseus.unalmed.edu.co
PS
I am using:
$platform "i386-pc-mingw32"
2001 Mar 21
1
Chernoff faces
Hello everybody:
Does any one has a function to build Chernoff faces?
Thank you very much
Kenneth Roy Cabrera Torres
krcabrer at epm.net.co
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not
2001 Mar 07
1
XEmacs on Windows
> Linux (?) Windows(?)
I mean in the Windows environment.
> I'm using under linux and the same installation worked for both, emacs and
> xemacs.
> P.J.
I am trying to use on ESS win XEmacs on Windows, but I don't know how to
tell XEmacs that use the ESS, I don't found the .emacs file and the system
don't let me create such a file.
Thank you for your help.
Kenneth
2002 Sep 23
2
R crash with internet2.dll
Hi,
I'm using:
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 1
minor 5.1
year 2002
month 06
day 17
language R
and I would like to apply:
> update.packages()
trying URL
2003 Dec 10
2
OT: BibTex year-only citation in text?
Sorry for the off-topic question, but I know there are some talented
LaTeX users out there. Which bibliography style gives only the year in
text citations (e.g "for further details, see Anderson (1992)" )?
Thanks
Jason
--
Indigo Industrial Controls Ltd.
http://www.indigoindustrial.co.nz
64-21-343-545
jasont at indigoindustrial.co.nz
2003 Nov 01
2
Question about the high dimensional density estimation
Hi,
I found that the R package "KernSmooth" can deal with only 1D and 2D data. But now I have a collection of 4-dimensional data (x1,x2,x3,x4) and would like to estimate the "mode" of the underlying density. What can I do about it ?
Thanks a lot.
--
Ying-Chao Hung
Assistant Professor
Graduate Institute of Statistics
National Central University
Chung-Li, Taiwan
TEL:
2003 Oct 21
5
run R under linux
Dear all,
Our department uses the linux system and we are not allowed to submit job
directly. We must make a batch to submit through "qmon".
so, I make a foo.sh file, which only contains one line: nohup R --vanilla <
foo.txt > foo.results
foo is all my codes. It is a simulation of 200 times. I set the seed at the
beginning. It is to estimate the success probability, which is
2003 Dec 21
3
Sweave/LaTeX Problem with EPS PDF
Dear List:
I am unsure if my problem is with Sweave or LaTeX. Anyhow, I am using the MikTeX distribution and TexnicCenter.
I can easily create Sweave files and all goes well until I try to incorporate graphics. I use the same code as found in the examples found in the users manual.
In R, the graphics I want are created as Sweave is creating the .tex file. When I examine the .tex file