I have the following longitudinal data:
id time y
1 1 10
1 2 12
1 3 15
1 6 18
2 1 8
2 3 9
2 4 11
2 5 12
3 1 8
3 4 16
4 1 9
4 5 13
5 1 7
5 2 9
5 6 11
I want to select the observations at time 4. if the observation at time 4 is
missing, then i want to slect the observation at time 3. if the ob
Dear all;
I have a function written in R that returns as a list of values as
output that has associated some user defined attributes to it. How can
hide these attributes when printing the output on screen? I'm using
R-2.8.1 on WinXPit's like hiding the attr of the output from the
scale function
Monte Milanuk wrote:
>> I have a reference book that discusses regression model selection
>> using several methods - what they call 'Forward Model Selection' i.e.
>> add one variable at a time and examining R, R^2, Mallow's C-p value,
>> etc., Backward Model Selection' i.e. starting out with all t
Hello,
Newbie here, be gentle ;)
I have a reference book that discusses regression model selection using
several methods - what they call 'Forward Model Selection' i.e. add one
variable at a time and examining R, R^2, Mallow's C-p value, etc., 'Backward
Model Selection' i.e. starting out with all
?return
On Sat, Jan 17, 2009 at 8:08 PM, Edwin Wibisono wrote:
> Hello, My name is Edwin, I come from INDONESIA
> I have problem
>
> I creating function then I have many calculation
> like this
> xx<-function(){
> a<-sd()
> b<-beta1.hat
> c<-beta2.hat
> data.entry(a,b,c)
> }
>
> then
> i have
On Sat, Jan 17, 2009 at 4:00 PM, Duncan Murdoch wrote:
> On 17/01/2009 4:29 PM, Ben Bolker wrote:
>>
>> Duncan Murdoch stats.uwo.ca> writes:
>>
>>
>>> R is open source, so this is no mystery: if you use [noae] then Sweave
>>> won't use the ae package in LaTeX. The problem you were having with q
Yes it is a homework problem, I included the whole question as I thought it
would make it easier to explain however I am unsure of how to do the
confidence interval part. As far as I am aware I have set up a matrix with
my 100 samples of 100 and have calculated means. Do I need to set up a new
m
Rachel Keyes hotmail.com> writes:
>
>
> I am new to R and Im some trouble with the following question... Generate 100
standard normal N(0,1) samples
> of size 100, X1(k),...,X100(k) where k=1,...,100 (The k is and indicie in
brackets) Calculate the sample
> mean for each sample. For each sampl
Download the source package 'R-2.8.1.tar.gz' and find what you need in the
'src' directory .
2009/1/18 Murray Cooper
> Dear Dr Murdoch,
>
> I understand in principle your explanation, but specifically where in the
> source distribution are these functions found? For instance, I would like
> to l
I am new to R and Im some trouble with the following question... Generate 100
standard normal N(0,1) samples of size 100, X1(k),...,X100(k) where
k=1,...,100 (The k is and indicie in brackets) Calculate the sample mean for
each sample. For each sample mean Xbark the 0.95-confidence interval fo
I am new to R and Im some trouble with the following question...
Generate 100 standard normal N(0,1) samples of size 100, X1(k),...,X100(k)
where k=1,...,100 (The k is and indicie in brackets)
Calculate the sample mean for each sample.
For each sample mean Xbark the 0.95-confidence interval fo
Hello, My name is Edwin, I come from INDONESIA
I have problem
I creating function then I have many calculation
like this
xx<-function(){
a<-sd()
b<-beta1.hat
c<-beta2.hat
data.entry(a,b,c)
}
then
i have function too, almost same
yy<-function(){
d<-sd()
e<-beta1.hat
f<-beta2.hat
data.ent
2009/1/16 Spencer Graves :
> 1. RSiteSearch('{periodic spline}') produced 12 hits. I looked at the
> first five and found that four of them seemed relevant to your question.
> 2. The third hit in this list notes that the DierckxSpline package has
> periodic splines, while 'fda' recommend
See ?title
On Sat, Jan 17, 2009 at 8:30 PM, Jörg Groß wrote:
> Hi,
>
> is there a way to increase the distance beween the plot (or plot-region) and
> the main-title?
>
> I haven't found anything via ?par().
>
>
>
> Thanks for any help!
>
> __
> R-help@r
Hi,
is there a way to increase the distance beween the plot (or plot-
region) and the main-title?
I haven't found anything via ?par().
Thanks for any help!
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE d
Ahmed, Rayhan wrote:
Hello again,
I am trying to create a color scale plotting the hydroathy index (y-axis)
versus residue (x-axis) - each residue (1-100) has a value between 0-1. I've
been trying to create a scale where:
0-0.499: increasing intensity of red
0.5- yellow
0.51 - 1 increasing in
This is not a bug.
If you use a font that doesn't have a character which you want to use
it's an inconvenience :-)-O
el
On 18 Jan 2009, at 00:16 , Peter Dalgaard wrote:
Peter Dalgaard wrote:
Paul Johnson wrote:
Hey, everybody.
I am concluding that this Sweave wrecks quotation marks in
ty
Hello again,
I am trying to create a color scale plotting the hydroathy index (y-axis)
versus residue (x-axis) - each residue (1-100) has a value between 0-1. I've
been trying to create a scale where:
0-0.499: increasing intensity of red
0.5- yellow
0.51 - 1 increasing intensity of green.
THis
Murray Cooper wrote:
Dear Dr Murdoch,
I understand in principle your explanation, but specifically where in the
source distribution are these functions found? For instance, I would like
to look at the code for model.matrix. Ex:
ans <- .Internal(model.matrix(t, data))
I have looked at the sou
Look for do_modelmatrix here:
https://svn.r-project.org/R/trunk/src/main/model.c
On Sat, Jan 17, 2009 at 5:40 PM, Murray Cooper wrote:
> Dear Dr Murdoch,
>
> I understand in principle your explanation, but specifically where in the
> source distribution are these functions found? For instance, I
Dear Dr Murdoch,
I understand in principle your explanation, but specifically where in the
source distribution are these functions found? For instance, I would like
to look at the code for model.matrix. Ex:
ans <- .Internal(model.matrix(t, data))
I have looked at the source distribution but b
I think that you can call the R script by system function in php.
See ?commandArgs for passes arguments.
On Fri, Jan 16, 2009 at 5:50 PM, Applejus wrote:
>
> Hi,
>
> I know I've already asked this question, but I am really getting trouble
> getting a PHP document execute an R function on window
Peter Dalgaard wrote:
Paul Johnson wrote:
Hey, everybody.
I am concluding that this Sweave wrecks quotation marks in typewriter
font is a bug in Sweave.
No. It's generic to the ae package. Try this:
\documentclass{article}
\usepackage{ae}
\begin{document}
\noindent
\texttt{``double quotes''
On 17/01/2009 4:29 PM, Ben Bolker wrote:
Duncan Murdoch stats.uwo.ca> writes:
R is open source, so this is no mystery: if you use [noae] then Sweave
won't use the ae package in LaTeX. The problem you were having with
quotes is that the ae package doesn't define those. If you choose not
t
Paul Johnson wrote:
Hey, everybody.
I am concluding that this Sweave wrecks quotation marks in typewriter
font is a bug in Sweave.
No. It's generic to the ae package. Try this:
\documentclass{article}
\usepackage{ae}
\begin{document}
\noindent
\texttt{``double quotes''}\\
\texttt{"double quo
Could you please provide further details - I am still still unable to produce
this image.
Thanks!
-ray
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the po
Duncan Murdoch stats.uwo.ca> writes:
> R is open source, so this is no mystery: if you use [noae] then Sweave
> won't use the ae package in LaTeX. The problem you were having with
> quotes is that the ae package doesn't define those. If you choose not
> to use it, then you won't get the sy
I was wondering if there were any R packages supporting fast set intersection.
I am aware of base::intersection, bit::`&`, and set::set_intersection,
each of which has its advantages. base::intersection is
space-efficient and accepts arbitrary unsorted lists of arbitrary base
types. set::set_int
On 17/01/2009 3:15 PM, Paul Johnson wrote:
Hey, everybody.
I am concluding that this Sweave wrecks quotation marks in typewriter
font is a bug in Sweave.
I think you're being unfair: this is a LaTeX bug, not an Sweave bug.
See below.
I've uploaded the foo.tex file so now you can see the R
Hey, everybody.
I am concluding that this Sweave wrecks quotation marks in typewriter
font is a bug in Sweave.
I've uploaded the foo.tex file so now you can see the Rnw, tex, and
pdf file side by side.
http://pj.freefaculty.org/latex
As previous poster noted, the Sweave instruction is added at
Here is yet another way of doing it:
> x <- c(1,2,2,3,3,4,4,4,5,1)
> cvt <- c('1'=12, '2'=13, '3'=17, '4'=20, '5'=22)
> cvt[as.character(x)]
1 2 2 3 3 4 4 4 5 1
12 13 13 17 17 20 20 20 22 12
On Sat, Jan 17, 2009 at 12:47 PM, Jörg Groß wrote:
> thanks for the great help!
>
> But I have
For a good, extemely basic, tutorial see
http://www.math.ilstu.edu/dhkim/Rstuff/Rtutor.html
You might also want to have a look at
http://zoonek2.free.fr/UNIX/48_R/all.html
If you are familiar with SPSS or SAS then Bob Muenchen's paper in PDF form
http://oit.utk.edu/scc/RforSAS&SPSSusers.pdf (
On Jan 17, 2009, at 12:47 PM, Jörg Groß wrote:
thanks for the great help!
But I have one additional question (hope I can work alone then);
I want to replace the values of a vector, like this:
x <- c(1,2,2,3,3,4,4,4,5,1)
x[x==1] <- c(12)
x[x==2] <- c(13)
x[x==3] <- c(17)
x[x==4] <- c(20)
x
> I am trying to fit a exponential power distribution
>
> y = b/(2*pi*a^2*gamma(2/b))*exp(-(x/a)^b)
>
> to a bunch of data for x and y I have in a table.
>> data
>x y
> 1 2527
> 2 7559
> 3125 219
> ...
> 25912925 1
> 260
Dear Jörg,
Take a look at ?recode in the car package.
HTH,
Jorge
On Sat, Jan 17, 2009 at 12:47 PM, Jörg Groß wrote:
> thanks for the great help!
>
> But I have one additional question (hope I can work alone then);
>
>
> I want to replace the values of a vector, like this:
>
>
> x <- c(1,2,2,
thanks for the great help!
But I have one additional question (hope I can work alone then);
I want to replace the values of a vector, like this:
x <- c(1,2,2,3,3,4,4,4,5,1)
x[x==1] <- c(12)
x[x==2] <- c(13)
x[x==3] <- c(17)
x[x==4] <- c(20)
x[x==5] <- c(22)
is there a way to do that just i
ronggui wrote:
I think you have to recode the derived variable of as.numeric(z).
The easiest way is probably to use indexing:
> z <- c("male", "male", "female")
> z <- factor(z)
> c(5,3)[z]
[1] 3 3 5
or, slightly more foolproof
> c(male=3,female=5)[as.character(z)]
male male female
Raphaelle rvc.ac.uk> writes:
>
>
> Hello,
>
> I am fitting a gmler using poisson, and I was looking for a documentation to
> interpret correctly the output. I'm quite a beginner with these kind of
> models.
> I couldn't find something in the lme4 package manual. and on the internet
> neither..
> x <- c(1,1,1,2,2,3,4,4,5)
> x[x %in% 1:3]
[1] 1 1 1 2 2 3
So ...
> x[x %in% 1:3] <- 1
> x
[1] 1 1 1 1 1 1 4 4 5
On Jan 17, 2009, at 12:03 PM, Jörg Groß wrote:
Hi,
If I have following vector;
x <- c(1,1,1,2,2,3,4,4,5)
and I want to change values in the range of 1 to 3 into the value 1,
On Sat, 17 Jan 2009, Charles C. Berry wrote:
On Sat, 17 Jan 2009, J?rg Gro? wrote:
Hi,
I know how to convert a factor-variable into a numeric variable via
as.numeric().
But how can I control the values that are assigned?
For example, I have this factor-variable:
z <- c("male", "mal
The R Inferno, page 38.
Patrick Burns
patr...@burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of "The R Inferno" and "A Guide for the Unwilling S User")
Jörg Groß wrote:
Hi,
If I have following vector;
x <- c(1,1,1,2,2,3,4,4,5)
and I want to change values in the range o
If we know they are integer values only then this returns
the desired vector
replace(x, x %in% 1:3, 1)
or this overwrites the input:
x[x %in% 1:3] <- 1
On Sat, Jan 17, 2009 at 12:03 PM, Jörg Groß wrote:
> Hi,
>
>
> If I have following vector;
>
>
> x <- c(1,1,1,2,2,3,4,4,5)
>
> and I want to c
ifelse is your friend:
> z <- c("male", "male", "female")
> z <- as.factor(z)
>
> z <- ifelse(z == "male", 3, 5)
> z
[1] 3 3 5
> class(z)
[1] "numeric"
>
--
David Winsemius
On Jan 17, 2009, at 11:40 AM, Jörg Groß wrote:
Hi,
I know how to convert a factor-variable into a numeric variabl
On Sat, 17 Jan 2009, J?rg Gro? wrote:
Hi,
I know how to convert a factor-variable into a numeric variable via
as.numeric().
But how can I control the values that are assigned?
For example, I have this factor-variable:
z <- c("male", "male", "female")
z <- as.factor(z)
And I want to con
Is this what you want:
> x <- c(1,1,1,2,2,3,4,4,5)
> ifelse(x >= 1 & x <= 3, 1, x)
[1] 1 1 1 1 1 1 4 4 5
>
On Sat, Jan 17, 2009 at 12:03 PM, Jörg Groß wrote:
> Hi,
>
>
> If I have following vector;
>
>
> x <- c(1,1,1,2,2,3,4,4,5)
>
> and I want to change values in the range of 1 to 3 into the v
try this:
x <- c(1,1,1,2,2,3,4,4,5,3.2,0.5)
x[x >= 1 & x <= 3] <- 1
x
I hope it helps.
Best,
Dimitris
Jörg Groß wrote:
Hi,
If I have following vector;
x <- c(1,1,1,2,2,3,4,4,5)
and I want to change values in the range of 1 to 3 into the value 1, how
can I do that?
I tried
x[x ==
Hi,
If I have following vector;
x <- c(1,1,1,2,2,3,4,4,5)
and I want to change values in the range of 1 to 3 into the value 1,
how can I do that?
I tried
x[x == c(1:3)] <- c(1)
but than I get;
x
[1] 1 1 1 2 1 1 4 4 5
R doesn't change the 2 into a 1.
But why?
___
Dear Friends,
Here is an algorithm for finding concave hulls: http://get.dsi.uminho.pt/local/
Has anyone implemented such an algorithm in R?
RSiteSearch('concave hull') didn't reveal one (I think).
_
Professor Michael Kubovy
University of Virginia
Department of Psych
BTW, a better way to convert factor into a numeric variable is to use
unclass().
On Sun, Jan 18, 2009 at 12:40 AM, Jörg Groß wrote:
> Hi,
>
> I know how to convert a factor-variable into a numeric variable via
> as.numeric().
>
> But how can I control the values that are assigned?
>
>
> For exam
I think you have to recode the derived variable of as.numeric(z).
On Sun, Jan 18, 2009 at 12:40 AM, Jörg Groß wrote:
> Hi,
>
> I know how to convert a factor-variable into a numeric variable via
> as.numeric().
>
> But how can I control the values that are assigned?
>
>
> For example, I have this
Hi,
I know how to convert a factor-variable into a numeric variable via
as.numeric().
But how can I control the values that are assigned?
For example, I have this factor-variable:
z <- c("male", "male", "female")
z <- as.factor(z)
And I want to convert male in 3 and female into the nume
On 17 January 2009 at 10:35, Subba Rao wrote:
| I have tons of data files that I have to decide how/which subsets to
| extract. While researching data mining products I came across R. As a
| newbie, where do I start to start using this popular tool?
|
| Any help is appreciated.
How about readi
Actually sep = "," and header = TRUE are the defaults so its just
DF <- read.xls(v, pattern = "EWSB")
On Sat, Jan 17, 2009 at 9:57 AM, Gabor Grothendieck
wrote:
> Try this. pattern = "EWSB" says to ignore everything in the file
> before the first line containing EWSB. It then reads the
> rema
Hint: You already know how to write all rows at once and row by row -
now write a set of rows each time. /H
On Sat, Jan 17, 2009 at 7:21 AM, Gundala Viswanath wrote:
> How do you do that Henrik? Write.table doesn't have that option.
>
> Usage:
> write.table(x, file = "", append = FALSE, quote
Hello again,
I have tons of data files that I have to decide how/which subsets to
extract. While researching data mining products I came across R. As a
newbie, where do I start to start using this popular tool?
Any help is appreciated.
Thank you in advance.
Regards,
Subba Rao
ewbie, where d
How do you do that Henrik? Write.table doesn't have that option.
Usage:
write.table(x, file = "", append = FALSE, quote = TRUE, sep = " ",
eol = "\n", na = "NA", dec = ".", row.names = TRUE,
col.names = TRUE, qmethod = c("escape", "double"))
- Gundala Viswa
r-sig-mixed-mod...@r-project.org maybe more appropriate for your question.
You may find answers there.
2009/1/17 Raphaelle
>
> Hello,
>
> I am fitting a gmler using poisson, and I was looking for a documentation
> to
> interpret correctly the output. I'm quite a beginner with these kind of
> mod
Do it in chunks of rows. /H
On Sat, Jan 17, 2009 at 6:55 AM, Gundala Viswanath wrote:
> Hi Hadley,
>
> I had to do it by line. Because, in practice, I will
> manipulate the figures and string before printing it.
>
> And I can't bind these results into one new object,
> because there are literally
Try this. pattern = "EWSB" says to ignore everything in the file
before the first line containing EWSB. It then reads the
remainder read.table style into data frame DF.
library(gdata)
v <- "http://www.statistics.gov.uk/elmr/01_09/downloads/Table1_07.xls";
DF <- read.xls(v, pattern = "EWSB", sep
Hi Hadley,
I had to do it by line. Because, in practice, I will
manipulate the figures and string before printing it.
And I can't bind these results into one new object,
because there are literally millions of this lines, and
R object can't handle that in my 4GB Ram memory.
I tried your suggesti
I am trying to figure out a way to download an Excel file and then read a
range into R - so that i can have a reasonably automated process. I have
been trying to use the RODBC package, but with little success. I suspect
that this isnt the right route
Here is some code. My aim is to read in the
On Sat, Jan 17, 2009 at 7:59 AM, gundalav wrote:
> Dear Jim and all,
>
> Allow me to ask your expert opinion.
>
>
> Using the data (16Mb) downloadable from here:
>
> http://drop.io/gundalav/asset/test-data-zip
>
>
> It took this long under 1994.070Mhz Cpu Linux, using
> "write.table"
>
>> proc.tim
Saeed Abu Nimeh wrote:
> Subba Rao wrote:
>
>> Hi,
>>
>> Today I came across the R application and I will admit I am not a
>> Statistician. However, I think this application will be useful for me
>> at work. I am a Network/System Security Engineer trying to make sense
>> of the huge security d
Dear Jim and all,
Allow me to ask your expert opinion.
Using the data (16Mb) downloadable from here:
http://drop.io/gundalav/asset/test-data-zip
It took this long under 1994.070Mhz Cpu Linux, using
"write.table"
> proc.time() - ptm1
usersystem elapsed
16581.833 5787.228 21386.064
There are many answers to this in R but some considerations are
- what platform are you using?
- do you have access to Excel or only to the spreadsheet itself? If you
have access to Excel is it on the same machine as R?
- is it an Excel 2003 spreadsheet (.xls) or Excel 2007 spreadsheet (.xlsx)?
-
On 1/16/09, venkata kirankumar wrote:
> can any one suggest how to read data from Excel Spread sheet
>
Perhaps easiest alternative for Excel users: RExcel [1]. I would
suggest to use this bundle installer [2].
When in Excel with RExcel loaded, select your data in Excel and choose
"Put R Datafram
nosek wrote:
> Hello,
>
> soon after my last posting to this thread I stumbled upon the do.call
> function and came to the very much the same version as yours. It is good!
>
at least for the sort of tasks as in the examples below. but i haven't
tested it beyond those, and in r you shouldn't re
On 17/01/2009 2:23 AM, zhijie zhang wrote:
Dear all,
I want to see the source codes for "dchisq(x, df, ncp=0, log = FALSE)",
but cannot find it.
I input "dchisq" in the R interface, and then enter, the following message
return:
dchisq
/*/
fu
On 17-Jan-09 02:57:13, Jörg Groß wrote:
> Hi,
> I have a problem with the R syntax.
> It's perhaps pretty simple, but I don't understand it ...
>
> I can extract a column from a data.frame with the following code
> for example ...
>
> b$row1[b$row1 == "male"]
>
> so I see all male-entries.
>
>
Hello,
soon after my last posting to this thread I stumbled upon the do.call
function and came to the very much the same version as yours. It is good!
However, it looks that both name clashes and mixing keyword and positional
styles in argument binding and function calls may lead to very drastic
On Fri, 16 Jan 2009, r-help-requ...@r-project.org wrote:
Date: Thu, 15 Jan 2009 13:29:03 +0100
From: Pablo G Goicoechea
Subject: Re: [R] How to create a chromosome location map by locus ID
To: Sake
Cc: r-help@r-project.org
Message-ID: <496f2c0f.3040...@neiker.net>
Content-Type: text/plain; char
Does R implements Pseudo-F-Statistics Clustering ?
Vogel and Wong derived a formula to evaluate the best clusters number through
such a method.
Silhouette metod only provides an average evaluation.
Thank you very much.
Maura
tutti i telefonini TIM!
[[alternative HTML version deleted]
Hi,
I am clustering objects using the agnes() function and the UPGMA
clustering method (function = "average"). Everything works well, but
apparently something is wrong with the dendrogram. For example:
x<-c(102,102.1,112.5,113,100.3,108.2,101.1,104,105.5,106.3)
y<-c(110,111,110.2,112.1,119.5,122.
I guess you have the binary distribution, not the R source code.
The functions you want seem to be defined in the files dchisq.c and dnchisq.c in
https://svn.r-project.org/R/trunk/src/nmath/
2009/1/17 zhijie zhang :
> Dear all,
> I want to see the source codes for "dchisq(x, df, ncp=0, log = F
74 matches
Mail list logo