Scott == Scott Hyde [EMAIL PROTECTED]
on Tue, 15 May 2007 17:03:13 -1000 (HST) writes:
Scott Hi,
Scott I'd like to reshape a sparse matrix generated from the Matrix
package. I can't seem to do it with the command
Scott dim(A) - c(6,9)
Scott which works perfectly with
Hi
I am using the package urca and I am interested about the KPSS test.
That works fine except the method summary did not work in the script,
only when it is typed direct in the console the results are shown( not a
source file).
Is there any problem with these method ?
Dear R useRs,
The new contributed packages 'ICS' and 'ICSNP' are available on CRAN.
Descriptions:
The 'ICS' package implements the 2 scatter matrix transformation to
obtain an invariant coordinate system or independent components,
depending on the underlying assumptions. The result of the
Thanks for the respons, Martin. The program I wrote works as well for doing
the reshaping, but it is nice to have it built in.
Is there a way to tell what version of Matrix is installed, and how do we know
when new releases are issued? I installed Matrix fairly recently, and thought
I was
hi dear R users,
I'm a newbie with R and excuse me if my question is stupid ... but i've read
lot of documentation and I don't know how to do.
I have a dataset like
xyvar1var2
241050
3 32070
325068
45 3442
531023
7823
hello,
I wanna use some mathematics formula and to do this I tried several way in
paricular using
strsplit
textconnection
scan
setdiff
but I think that it's a lil hard
the data frame that I'm working on is as follow
donCalcara2
Id_Cara
Hello,
I'd like to generate a filled step-function in R as you can see in the
attachement (image is generated by grapher, but I need a freely
available alternative). The problem is, that I don't know, how to fill
it up. My code right now looks like this:
pH - c(0,6.1,6.1,6.3,6.6,7.3,0)
On Tue, 15 May 2007, Scott Hyde wrote:
Thanks for the respons, Martin. The program I wrote works as well for
doing the reshaping, but it is nice to have it built in.
Is there a way to tell what version of Matrix is installed, and how do
we know when new releases are issued? I installed
hello,
how can I do to drop C from this character C325 ?
_
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing list
Hi,
I am not sure what exactly you would like to fill up and how, but take a
look at
?polygon
and the examples given there.
hth
Petr
Beate Kowalczyk napsal(a):
Hello,
I'd like to generate a filled step-function in R as you can see in the
attachement (image is generated by grapher, but I
elyakhlifi mustapha wrote:
hello,
how can I do to drop C from this character C325 ?
x - C325
substring(x, first=2)
[1] 325
gsub(C, , x)
[1] 325
gsub([A-Z], , x)
[1] 325
?substring
?gsub
_
elyakhlifi mustapha wrote:
hello,
how can I do to drop C from this character C325 ?
1. if C is always single and always first:
substring(C325,2)
2. more generic solution, drops all letters
sp-unlist(strsplit(C325,split=[A-Z]))
sp-sp[nchar(sp)0]
sp
--
View this message in context:
Dear all,
the question was if lmer can estimate the variance components correctly,
although my design is very UNbalanced.
Also, how do I find the percentage of the variance from every component? Do I
have to add all the varianc components and then divide each one by the total?
Thanks
P.S.
Perhaps you could step back and try and explain to the list what your
overall goal is. From looking at your code, it looks like you are
trying to take some SAS code and turn it in to the equivalent R code
automatically. Is that correct? What is the problem you are trying
to solve?
Hadley
On
hie
l would like to create about ten strata l have tried using
sample(c(1,2),1,replace=TRUE) but all l get is a vector of 1 and 2 if i
change it to sample(c(1,10),1,replace=TRUE) it gives me a vector of 1 and 10
how do l go about it
-
Dear R-ians
I have a data frame like
Person_id Date/timeCount
- -- ---
123 20 May 1999 1
123 21 May 1999 3
222 1 Feb 2000 2
222 3 Feb 2000 4
I want to create ts objects for each person_id (i.e. 123 and
Hi,
I am struggling with using R CMD BATCH command. Kindly suggest solution to
the following problem.
I have a function named CinC with accept two input parameters. This can be
shown as:
CinC - function(start, end)
where start and end both are character strings.
Please suggest me how can I
sorry all l got the answer thanks
raymond chiruka [EMAIL PROTECTED] wrote: hie
l would like to create about ten strata l have tried using
sample(c(1,2),1,replace=TRUE) but all l get is a vector of 1 and 2 if i
change it to sample(c(1,10),1,replace=TRUE) it gives me a vector of 1 and
Hi Petr,
polygon doesn't work very well, because I need a graphical display for
the laboratory results of my institute. So I have a lot of data in
.csv-format, and I don't really want to define a new polygon for each
dataset, because then I have to do a lot of extra-work. I need a
solution that
Explicez ce que vous voulez faire et donnez nous une
petite example.
Lisez et suivez les instuctions ici
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained,
reproducible code.
On peut ecrire en anglais et francais.
--- elyakhlifi mustapha [EMAIL
Something like this?
sample((1:10),100,replace=TRUE)
?sample
hth
Petr
raymond chiruka napsal(a):
hie
l would like to create about ten strata l have tried using
sample(c(1,2),1,replace=TRUE) but all l get is a vector of 1 and 2 if i
change it to sample(c(1,10),1,replace=TRUE) it gives
d. sarthi maheshwari wrote:
Hi,
I am struggling with using R CMD BATCH command. Kindly suggest solution to
the following problem.
I have a function named CinC with accept two input parameters. This can be
shown as:
CinC - function(start, end)
where start and end both are
I have the following csv file:
name,x,y,z
category,delta,gamma,epsilon
a,1,2,3
b,4,5,6
c,7,8,9
I'd like to create a numeric matrix of just the numbers in this csv dataset.
I've tried the following program:
sample.data - read.csv(sample.csv)
numerical.data - as.matrix(sample.data[-1,-1])
Hi,
please reply to the entire list (as a carbon copy) - I do not always
read this list properly or may not know the solution.
I do not know your data, but there does not seem to be much more work.
This works well for me with your pH and Tiefe variables:
?as.numeric
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Reseach Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometrics,
methodology and quality assurance
Beate Kowalczyk wrote:
Hello,
I'd like to generate a filled step-function in R as you can see in the
attachement (image is generated by grapher, but I need a freely
available alternative). The problem is, that I don't know, how to fill
it up. My code right now looks like this:
pH -
On Wed, 2007-05-16 at 08:10 -0400, Andrew Yee wrote:
I have the following csv file:
name,x,y,z
category,delta,gamma,epsilon
a,1,2,3
b,4,5,6
c,7,8,9
I'd like to create a numeric matrix of just the numbers in this csv dataset.
I've tried the following program:
sample.data -
have a look at: ?as.numeric() and ?data.matrix().
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web:
Thanks for the suggestion and the explanation for why I was running into
these troubles.
I've tried:
as.numeric(as.matrix(sample.data[-1, -1]))
However, this creates another vector rather than a matrix. Is there a
straight forward way to convert this directly into a numeric matrix rather
than
Hi,
There are many clues in the help.
First I created the file c:\sumfunction.R
x-as.numeric(commandArgs()[-1:-4] )
print(x)
addtogether-function(x,y){SUM-x+y;print(SUM)}
addtogether(x[1],x[2])
Then at the command line in Windows I enter
R --vanilla --slave --args 7 10 c:\sumfunction.R
On Wed, 2007-05-16 at 08:40 -0400, Andrew Yee wrote:
Thanks for the suggestion and the explanation for why I was running
into these troubles.
I've tried:
as.numeric(as.matrix(sample.data[-1, -1]))
However, this creates another vector rather than a matrix.
Right. That's because I'm an
hi! All:
I wonder if someone has done this before...
I am writing several functions that conduct statistical analysis using a
GUI interface by Tcl/Tk, they share many identical GUI components. What
I am trying to do now is to simplify the code by writing a GUI
repository for all the
On 5/16/07, fatih ozgul [EMAIL PROTECTED] wrote:
Dear R-ians
I have a data frame like
Person_id Date/timeCount
- -- ---
123 20 May 1999 1
123 21 May 1999 3
222 1 Feb 2000 2
222 3 Feb 2000 4
I want
Thanks for the suggestion.
However, I've tried sapply and data.matrix.
The problem is that it while it returns a numeric matrix, it gives back:
1 1 1
2 2 2
3 3 3
instead of
1 2 3
4 5 6
7 8 9
The latter matrix is the desired result
Thanks,
Andrew
On 5/16/07, Marc Schwartz [EMAIL PROTECTED]
Hallo R-users,
I would like to know if there is a way to get the effective degrees
of freedom in
local polinomial regression. At the moment, to carry out the local
polinomial regression, I am using the function
locpoly() in library KernSmooth (I need to estimate both the regression
function
Dear Hao,
You might take a look at how the Rcmdr package is implemented with many
reusable elements. There is, for example, an initializeDialog function.
I hope this helps,
John
John Fox, Professor
Department of Sociology
McMaster University
Hamilton, Ontario
The best place to start is
help(survdiff)
That's right -- read the documentation!
This tells you what is contained in the output to survdiff, namely objects
n, obs, exp, chisq, and var, including descriptions of each.
The number of degrees of freedom for the chisquare test is (#groups
Thanks again to everyone for all your help.
I think I've figured out the solution to my dilemma. Instead of using
data.matrix or sapply, this works for me:
sample.data-read.csv(sample.csv)
sample.matrix.raw-as.matrix(sample.data[-1,-1])
sample.matrix - matrix(as.numeric(sample.matrix.raw),
On 5/16/2007 8:58 AM, Hao Liu wrote:
hi! All:
I wonder if someone has done this before...
I am writing several functions that conduct statistical analysis using a
GUI interface by Tcl/Tk, they share many identical GUI components. What
I am trying to do now is to simplify the code by
On Wed, 2007-05-16 at 09:05 -0400, Andrew Yee wrote:
Thanks for the suggestion.
However, I've tried sapply and data.matrix.
The problem is that it while it returns a numeric matrix, it gives
back:
1 1 1
2 2 2
3 3 3
instead of
1 2 3
4 5 6
7 8 9
The latter matrix is the
hello r-helpers:
there is a .txt file:
x1 x2 x3 x4 x5 x6 x7 x8 x9 x10
x11 y1
17 5 77 18 19 24 7 24 24 72
52 100
2 6 72 18 17 15 4 12 18
Your call to mvr does not correspond to the documentation. See ?mvr
and try this:
Lines - x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 y1
17 5 77 18 19 24 7 24 24 72 52 100
2 6 72 18 17 15 4 12 18 35 42 97.2
17 2 58 10 5 3 4 3 3 40 28 98
17 2 69 14 13 12 4 6 6 50 37 93
2 3 75 20 38 18 6 12 18 73 67 99
14
Hi there.
I am trying to install SJava on my windows xp machine.
I downloaded the windows source file SJava_0.69-0.tar.gz from the web site
http://www.omegahat.org/RSJava/
I have folloed the XP command line instructions as directed in the table
underneath the download link:
cd
On Wed, 16 May 2007, mister_bluesman wrote:
Hi there.
I am trying to install SJava on my windows xp machine.
I downloaded the windows source file SJava_0.69-0.tar.gz from the web site
http://www.omegahat.org/RSJava/
I have folloed the XP command line instructions as directed in the table
I think this might be a bit more straight forward:
R mat - do.call(cbind, scan(clipboard, what=list(NULL, 0, 0, 0),
sep=,, skip=2))
Read 3 records
R mat
[,1] [,2] [,3]
[1,]123
[2,]456
[3,]789
Andy
From: Andrew Yee
Thanks again to everyone for all
Thank you for your help. Does that mean I am unable to create a java program
that runs on windows and evaluates R expressions within java code?
Prof Brian Ripley wrote:
On Wed, 16 May 2007, mister_bluesman wrote:
Hi there.
I am trying to install SJava on my windows xp machine.
I
On Wed, 2007-05-16 at 11:29 -0400, Liaw, Andy wrote:
I think this might be a bit more straight forward:
R mat - do.call(cbind, scan(clipboard, what=list(NULL, 0, 0, 0),
sep=,, skip=2))
Read 3 records
R mat
[,1] [,2] [,3]
[1,]123
[2,]456
[3,]789
Hi
I am using the package urca and I am interested about the KPSS test.
That works fine except the method summary did not work in
the script,
only when it is typed direct in the console the results are
shown( not a
source file).
Hello,
which version of urca are using? The problem you
Try this:
## Dataset
mydata - data.frame(x=sample(1:8,10,replace=T),y=sample(1:9,10,replace=T),
var1=rnorm(10),var2=rnorm(10))
## Put x and y in bins
xcut - cut(mydata$x,seq(0,8,2))
ycut - cut(mydata$y,seq(0,9,3))
## Create table
tapply(mydata$var1,list(ycut,xcut),mean)
- Norma
On 5/16/07,
On Wed, 16 May 2007, mister_bluesman wrote:
Thank you for your help. Does that mean I am unable to create a java program
that runs on windows and evaluates R expressions within java code?
No, because
a) I said 'I don't know': it might work but I thought you ought to be
aware of the issue
Thank you for your help. Does that mean I am unable to create a java program
that runs on windows and evaluates R expressions within java code?
mister_bluesman wrote:
Hi there.
I am trying to install SJava on my windows xp machine.
I downloaded the windows source file
I am experimenting with some of the common r functions.
I had a question re:using gsub (or some similar functions) on the contents of
a list.
I want to design a function that looks at everything contained din a list,
and anytime it finds the text string pattern replace it with x. I also
wish
After upgrading to 2.5.0 under freebsd 6.2 I updated all the add-on packages
in an R session via update.packages(...). R was unable to install
the Matrix package because it couldn't find the package.
Therefore I downloaded the *.tar.gz from the CRAN site and issued
R CMD INSTALL
On Wed, 2007-05-16 at 09:25 -0700, new ruser wrote:
I am experimenting with some of the common r functions.
I had a question re:using gsub (or some similar functions) on the
contents of a list.
I want to design a function that looks at everything contained din a
list, and anytime it finds
On 5/16/07, Vittorio De Martino [EMAIL PROTECTED] wrote:
After upgrading to 2.5.0 under freebsd 6.2 I updated all the add-on packages
in an R session via update.packages(...). R was unable to install
the Matrix package because it couldn't find the package.
Therefore I downloaded the *.tar.gz
Dear all,
in the past I have been able to access websites with data directly. For
example the following code works nicely
mydata -
read.table(http://www.lifetable.de/data/MPIDR/POL_2004.txt;, header=TRUE)
But what happens if I need a username and password (a different site)?
How do I do
Hi All.
I'm trying to run a simple model from Baayan, Davidson, Bates and getting
a confusing error message. Any ideas what I'm doing wrong here?
# Here's the data.
Subj- factor(rep(1:3,each=6))
Item- factor(rep(1:3,6))
SOA - factor(rep(0:1,3,each=3))
RT -
On 5/16/07, Iasonas Lamprianou [EMAIL PROTECTED] wrote:
Dear all,
the question was if lmer can estimate the variance components correctly,
although my design is very UNbalanced.
Yes, lmer can handle unbalanced data and large data sets.
Also, how do I find the percentage of the variance
Roland Rau wrote:
Dear all,
in the past I have been able to access websites with data directly. For
example the following code works nicely
mydata -
read.table(http://www.lifetable.de/data/MPIDR/POL_2004.txt;,
header=TRUE)
But what happens if I need a username and password
On 5/16/07, Rick DeShon [EMAIL PROTECTED] wrote:
Hi All.
I'm trying to run a simple model from Baayan, Davidson, Bates and getting
a confusing error message. Any ideas what I'm doing wrong here?
# Here's the data.
Subj- factor(rep(1:3,each=6))
Item- factor(rep(1:3,6))
SOA
On 5/16/07, Marc Schwartz [EMAIL PROTECTED] wrote:
On Wed, 2007-05-16 at 09:25 -0700, new ruser wrote:
I am experimenting with some of the common r functions.
I had a question re:using gsub (or some similar functions) on the
contents of a list.
I want to design a function that looks at
On Wed, 16 May 2007, Roland Rau wrote:
Dear all,
in the past I have been able to access websites with data directly. For
example the following code works nicely
mydata -
read.table(http://www.lifetable.de/data/MPIDR/POL_2004.txt;,
header=TRUE)
But what happens if I need a
Chuck, Roland is trying to read from a web site instead of a ftp site.
I have also gotten this to work:
read.table(ftp://myusr:[EMAIL PROTECTED]/mydir/test.dat)
But when I try to do the same thing from the SEC's ftp site I get an
error, so beyond R, there may be some internet settings that need
On Wed, 2007-05-16 at 13:18 -0400, Gabor Grothendieck wrote:
On 5/16/07, Marc Schwartz [EMAIL PROTECTED] wrote:
On Wed, 2007-05-16 at 09:25 -0700, new ruser wrote:
I am experimenting with some of the common r functions.
I had a question re:using gsub (or some similar functions) on the
Dear all,
so far I tried various things but I did not really succeed:
- starting R with --internet2
- using url()
- using read.table(http://myusr:[EMAIL PROTECTED]/adir/afile.txt)
I just have an idea what the problem could be for me:
The username is actually an email address. So the
Here is a recursive function you could try. Here f has been defined only to
convert character variables. Modify to suit.
recurse - function(x, f) {
if (length(x) == 0) return(x)
if (is.list(x)) for(i in seq_along(x)) x[[i]] - recurse(x[[i]], f)
else x - f(x)
x
}
f - function(x) if
Dear list members:
Once I know a KEGG pathway identifier, how can I check all its direct
children identifiers? you know, I could use GOMFCHILDREN or GOCCCHILDREN to
check the children terms for a specific GO term, but I don't know how to do it
in the same way for KEGG in R?
Many Thanks!!
Hello,
I have trouble adding an abline to a dotplot() from lattice package.
For example, I would like to draw a line at x=3:
library(lattice)
x-1:5
names(x) - c(a, b, c, d, e)
dotplot(sample(x))
panel.abline(v=3)
Produces a line on the left hand side of the origin. What would be a
correct
Thompson, Valeria V said the following on 5/16/2007 12:04 PM:
Hello,
I have trouble adding an abline to a dotplot() from lattice package.
For example, I would like to draw a line at x=3:
library(lattice)
x-1:5
names(x) - c(a, b, c, d, e)
dotplot(sample(x))
panel.abline(v=3)
On 5/16/07, Thompson, Valeria V [EMAIL PROTECTED] wrote:
Hello,
I have trouble adding an abline to a dotplot() from lattice package.
For example, I would like to draw a line at x=3:
library(lattice)
x-1:5
names(x) - c(a, b, c, d, e)
dotplot(sample(x))
panel.abline(v=3)
Produces a
Li, Hua [EMAIL PROTECTED] writes:
Dear list members: Once I know a KEGG pathway identifier, how can I
check all its direct children identifiers? you know, I could use
GOMFCHILDREN or GOCCCHILDREN to check the children terms for a
specific GO term, but I don't know how to do it in the same
I am working on an open source program to be used for
model selection and evalution. I would like to
utilize the graphical capabilities of R to generate
plots that I would then display in my software
program. What is the best way to go about this? I
have looked at Rserve and also looked at
I am generating a single graphic containing about 31 Boxplots; the issue
I am having is that not all the labels (3 characters each) are shown.
Interactively, within a R session, I can simply re-size the graphics
window and all the labels appear. But, what can I do non-interactively
to have all
Hi,
I've been searching for a solution to this but have come up empty.
I would like to suppress the plot creation when using the ewma function
in the qcc package. Normally it's just plot = FALSE, but the ewma
function doesn't have this option. Anything I'm missing or a work
around?
Many
On Wed, 2007-05-16 at 16:34 -0400, Thomas Adams wrote:
I am generating a single graphic containing about 31 Boxplots; the issue
I am having is that not all the labels (3 characters each) are shown.
Interactively, within a R session, I can simply re-size the graphics
window and all the
Marc,
That did it! Thank you so much for your help…
Regards,
Tom
Marc Schwartz wrote:
On Wed, 2007-05-16 at 16:34 -0400, Thomas Adams wrote:
I am generating a single graphic containing about 31 Boxplots; the issue
I am having is that not all the labels (3 characters each) are shown.
On 5/16/07, Gabor Grothendieck [EMAIL PROTECTED] wrote:
On 5/16/07, fatih ozgul [EMAIL PROTECTED] wrote:
Dear R-ians
I have a data frame like
Person_id Date/timeCount
- -- ---
123 20 May 1999 1
123 21 May 1999 3
222
I uploaded a new version of the lars package to CRAN,
which incorporates some nontrivial changes.
1) lars now has normalize and intercept options, both defaulted to TRUE,
which means the variables are scaled to have unit euclidean norm, and
an intercept is included in the model. Either or both
Hi useRs,
Perhaps I am having a senior moment?
I have a nested variable situation to model,
toy example:
df - data.frame(A = factor(c(a, a, x, x), levels = c(x, a)),
+ B = factor(c(b, x, x, x), levels = c(x, b)))
df
A B
1 a b
2 a x
3 x x
4 x x
So of course the full
with(df, interaction(A, B))
[1] a.b a.x x.x x.x
Levels: x.x a.x x.b a.b
A.B - factor(with(df, interaction(A, B)))
A.B
[1] a.b a.x x.x x.x
Levels: x.x a.x a.b
model.matrix(~ A.B, df)
(Intercept) A.B[T.a.x] A.B[T.a.b]
1 1 0 1
2 1 1 0
3
R-helpers:
I have a dataset that has 168 subjects and 12 variables. Some of the
variables have missing data and I want to use the multiple imputation
capabilities of the mice package to address the missing data. Given
that mice only supports linear models and generalized linear models (via
the
81 matches
Mail list logo