On Wed, 22 Jun 2005, Guohui Ding wrote:
prcomp(stats) Principal Components Analysis
princomp(stats) Principal Components Analysis
scale(base) Scaling and Centering of Matrix-like Objects
The first two are correct for PCA, but scale is not MDS.
MDS is available in cmdscale (stats), isoMDS
Dear R-List,
I want to use the label function (from Hmisc library) to allow for the
names of my isotopes.
library(Hmisc)
library(lattice)
library(grid)
num - c(78,137,129m)
nom - c(Ge,Cs,Te)
df - data.frame(GE78=seq(nom),CS137=seq(nom),TE129m=seq(nom))
if I use this function to create the
AndyL == Liaw, Andy [EMAIL PROTECTED]
on Tue, 21 Jun 2005 13:30:54 -0400 writes:
AndyL Try:
(x - factor(1:2, levels=1:5))
AndyL [1] 1 2
AndyL Levels: 1 2 3 4 5
(x - x[, drop=TRUE])
AndyL [1] 1 2
AndyL Levels: 1 2
or
(x - factor(1:2, levels=1:5))
(x2
I would like to extract predicted failure times from a
coxph model in library(survival). However, none of the
prediction options (lp, risk, expected, terms)
seem to bear any relationship to failure time.
Perhaps I am asking the wrong question, but can coxph
provide predicted failure times?
I have a dataset with
event=death
time (from medical examination until death/censoring)
dose (given at examination time)
Two groups are considered, a non-exposed group (dose=0), an exposed group
(dose between 5 and 60).
For some reason there is a theory of the dose increasing its effect over
On Wed, 22 Jun 2005, Dan Bebber wrote:
I would like to extract predicted failure times from a
coxph model in library(survival). However, none of the
prediction options (lp, risk, expected, terms)
seem to bear any relationship to failure time.
Perhaps I am asking the wrong question, but can
Dear Professor Firth,
David Firth said the following on 2005-06-16 17:22:
I do not have a ready stock of other examples, but I do have my own
version of a family function for this, reproduced below. It differs
from yours (apart from being a regular family function rather than using
a
I think that as the proponents do not agree, we need to leave this as is.
BTW, R-devel is the place to discuss patched to R, rather than R-help.
On Tue, 21 Jun 2005, Heather Turner wrote:
Agreed my examples may be trivial and I'm sure there are more efficient ways
to do the same thing, but I
Marianne dk [EMAIL PROTECTED] writes:
I have a dataset with
event=death
time (from medical examination until death/censoring)
dose (given at examination time)
Two groups are considered, a non-exposed group (dose=0), an exposed group
(dose between 5 and 60).
For some reason there is
I have a huge frame holding holding model results for a number of
locations and time series:
str(tonedata)
`data.frame': 434 obs. of 339 variables:
$ VALUE : int 101 104 105 106 111 118 119 121 122 123 ...
$ COUNT : int 2443 184 1539 1016 132 1208 1580 654 864 560 ...
$ AREA: num
I color some area grey with polygon() (with a red border) and then I
want to have the dashed red border in the legend as well. How do I
manage it?
And I want to mix (latex) expressions with text in my legend.
Just execute my lines below and you know want I mean. Or pass by at
Dear all
I am struggling with nlme and error message. Even going through
Pinheiro, Bates nlme book did not gave me a clue how to avoid
this.
fit - nlme(ce ~ fi1 / ((1+exp(fi2-fi3*tepl))^(1/fi4)), data =
temp1na.gr,
start = c(fi1=30, fi2=-100, fi3=-.05, fi4=40),
fixed = fi1+fi2+fi3+fi4~1,
You might save yourself some headaches by turning it into a matrix instead,
since all the columns are either integer or numeric:
tonedata - data.matrix(tonedata)
Data frames are really lists, so even when you get a one-row subset, it's
still a one-row data frame. You can use unlist() to turn
Hello Philippe,
Thanks for the explanation!
did you change the guidlgopen as well?
Now I get :
file - guiDlgOpen(title= Open case/control
file,defaultFile=,defaultDir=,multi=FALSE, filters = c(All files
(*.*), *.*))
gdata - read.table(file,as.is=T,header=T)
Error in file(file, r) :
PANTERA Laurent wrote:
Dear R-List,
I want to use the label function (from Hmisc library) to allow for the
names of my isotopes.
library(Hmisc)
library(lattice)
library(grid)
num - c(78,137,129m)
nom - c(Ge,Cs,Te)
df - data.frame(GE78=seq(nom),CS137=seq(nom),TE129m=seq(nom))
if I
Hi,
I just updated to R-2.1.1 and updated packages acordingly
However, after the update, routines that use polar.plot
did not function as correctly.
In plotrix 1.3.3 the polar.plot function does scale label.pos
to radians prior to calling radial.plot
Hence, the command
Hello again,
I am using the guidlglist
I noticed (on windows) that if you scroll the list by using the up and down
arrows of the gui by clicking with the mouse, if you click twice fast the
gui disappears and the value on top of the list is selected.
It is meant to be like that ?
Marco
First, many thanks to Simon Urbanek for his help.
A simulation case (50x34x5x3 250 replications) each based on behavior of
2500 consumers takes
- 2h20mins on a laptop (2 MHz, 1Go, WinXp)
- 1h on a G5 bi-proc (2.5 Mhz, 2Go)
A loop was used for the laptop, the same loop was transposed as function
This is a question about time-varying effects rather than time-varying
covariates, even if the SAS method tests for the former by using the
latter. SAS evaluates the line
dosetime=time*dose;
for all observations at each event time as it estimates the model, such
that you are not using
On 6/22/05, Petr Pikal [EMAIL PROTECTED] wrote:
Dear all
I am struggling with nlme and error message. Even going through
Pinheiro, Bates nlme book did not gave me a clue how to avoid
this.
fit - nlme(ce ~ fi1 / ((1+exp(fi2-fi3*tepl))^(1/fi4)), data =
temp1na.gr,
start = c(fi1=30,
Halldor Björnsson wrote:
Hi,
I just updated to R-2.1.1 and updated packages acordingly
However, after the update, routines that use polar.plot
did not function as correctly.
In plotrix 1.3.3 the polar.plot function does scale label.pos
to radians prior to calling radial.plot
Hence,
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne av Liaw, Andy
You might save yourself some headaches by turning it into a matrix instead,
since all the columns are either integer or numeric:
tonedata - data.matrix(tonedata)
Data frames are really lists, so even when you get a
Dear list,
Is there anyway i can make the following formula short
by r-programming?
CYCLE.n-c(NA,
WET[1]*DRY[1],
WET[1]*DRY[2]+WET[2]*DRY[1],
WET[1]*DRY[3]+WET[2]*DRY[2]+WET[3]*DRY[1],
WET[1]*DRY[4]+WET[2]*DRY[3]+WET[3]*DRY[2]+WET[4]*DRY[1],
Dear list members;
Is there any trick to extract the coefficients along with std errors,
t-values and p-values for each beta from a gnls fit model (similar to the
results obtained using summary(lm)$coeff for linear models)?
Thanks for any hint
cm
__
Hello all.
I'm confused a bit about contour plots. After reading the help at
?contour, it seems as though the contour plot is for 3D plots (x,y, and
z). My data is in the form of grid coordinates (x,y), and I want to see a
contour plot of the data so that I can tell where most observations lie.
At 23:09 21/06/05, Prof Brian Ripley wrote:
On Tue, 21 Jun 2005, Douglas Bates wrote:
On 6/21/05, Søren Højsgaard [EMAIL PROTECTED] wrote:
Thanks everyone for your help, more comments at the foot
The problem with simulate.lme is that it only returns logL for a given
model fitted to a simulated
I guess what you want is contours of the density over the x-y plane. There
are a few choices that I know of:
kde2d in MASS (part of the `VR' bundle)
bkde2d in KernSmooth
sm.density in sm
locfit in locfit
Andy
From: Bernard L. Dillard
Hello all.
I'm confused a bit about contour plots.
I will be out of the office starting 06/21/2005 and will not return until
06/29/2005.
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Mohammad Ehsanul Karim [EMAIL PROTECTED] writes:
Dear list,
Is there anyway i can make the following formula short
by r-programming?
CYCLE.n-c(NA,
WET[1]*DRY[1],
WET[1]*DRY[2]+WET[2]*DRY[1],
WET[1]*DRY[3]+WET[2]*DRY[2]+WET[3]*DRY[1],
As far as I can see:
z - toeplitz(DRY)
With such a wide range of backgrounds here, I thought I'd toss this out here
to get ideas.
I've lucked into some clinical trial data where schizophrenic patients were
randomly assigned to start on one of three drugs, then were followed
naturalistically over a year (or more, depending on when
On Wed, 22 Jun 2005, Dan Bebber wrote:
I would like to extract predicted failure times from a
coxph model in library(survival). However, none of the
prediction options (lp, risk, expected, terms)
seem to bear any relationship to failure time.
Perhaps I am asking the wrong question, but can
Hi,
I would to get the first letter of a word like:
title_cat
TitleCat
1 Training
I would like T from Training!
Thnaks a lot for your help
Sabine
-
Téléchargez le ici !
[[alternative HTML version deleted]]
Navarre Sabine wrote:
Hi,
I would to get the first letter of a word like:
title_cat
TitleCat
1 Training
I would like T from Training!
Thnaks a lot for your help
substr(title_cat,1,1)
Uwe Ligges
Sabine
-
Use substring() or substr().
Andy
From: Navarre Sabine
Hi,
I would to get the first letter of a word like:
title_cat
TitleCat
1 Training
I would like T from Training!
Thnaks a lot for your help
Sabine
-
?substring
Navarre Sabine wrote:
Hi,
I would to get the first letter of a word like:
title_cat
TitleCat
1 Training
I would like T from Training!
Thnaks a lot for your help
Sabine
-
Téléchargez le ici !
or What about;
strsplit(Training, split=)[[1]][1]
[1] T
Ken Knoblauch
Inserm U371, Cerveau et Vision
Department of Cognitive Neurosciences
18 avenue du Doyen Lepine
69500 Bron
France
tel: +33 (0)4 72 91 34 77
fax: +33 (0)4 72 91 34 61
portable: 06 84 10 64 10
On Wed, 2005-06-22 at 16:42 +0200, Navarre Sabine wrote:
Hi,
I would to get the first letter of a word like:
title_cat
TitleCat
1 Training
I would like T from Training!
Thnaks a lot for your help
Sabine
There are multiple approaches, but you need to be careful,
Bernard L. Dillard wrote:
Hello all.
I'm confused a bit about contour plots. After reading the help at
?contour, it seems as though the contour plot is for 3D plots (x,y, and
z). My data is in the form of grid coordinates (x,y), and I want to see a
contour plot of the data so that I can
I receive the following meteo dataset regularly, containing the average
daily temperatures (tMedia) of a certain month for 24 selected meteo-stations
(COD_WMO) whose human-readable names are in (NOME).
str(tabella)
`data.frame': 1038 obs. of 4 variables:
$ COD_WMO: int 16045 16045 16045
Thomas Steiner wrote:
I color some area grey with polygon() (with a red border) and then I
want to have the dashed red border in the legend as well. How do I
manage it?
And I want to mix (latex) expressions with text in my legend.
Both points are not that easy to solve, hence I'd like to
See ?reshape
Uwe Ligges
[EMAIL PROTECTED] wrote:
I receive the following meteo dataset regularly, containing the average
daily temperatures (tMedia) of a certain month for 24 selected meteo-stations
(COD_WMO) whose human-readable names are in (NOME).
str(tabella)
`data.frame': 1038 obs.
Hi,
I have a text mining project and currently I am working on feature
generation/selection part.
My plan is selecting a set of words or word combinations which have
better discriminant capability than other words in telling the group
id's (2 classes in this case) for a dataset which has 2,000,000
Looks to me like you want something like reshape()...
Andy
From: [EMAIL PROTECTED]
I receive the following meteo dataset regularly, containing
the average
daily temperatures (tMedia) of a certain month for 24
selected meteo-stations
(COD_WMO) whose human-readable names are in (NOME).
Try:
DRY-c(2,5,3,7,11)
WET-(1:5)*10
print(filter(c(rep(0,length(WET)),DRY),WET))
Time Series:
Start = 1
End = 10
Frequency = 1
[1] NA NA 0 20 90 190 360 640 NA NA
CYCLE.n-c(NA,
WET[1]*DRY[1],
WET[1]*DRY[2]+WET[2]*DRY[1],
WET[1]*DRY[3]+WET[2]*DRY[2]+WET[3]*DRY[1],
On Wed, 2005-06-22 at 17:12 +0200, [EMAIL PROTECTED] wrote:
I receive the following meteo dataset regularly, containing the average
daily temperatures (tMedia) of a certain month for 24 selected meteo-stations
(COD_WMO) whose human-readable names are in (NOME).
str(tabella)
`data.frame':
In addition to Peter's suggestion of converting
to a matrix operation, here is a simple solution
using naive R programming.
Using the 7th element of CYCLE.n as an example:
replace this:
WET[1]*DRY[6]+WET[2]*DRY[5]+WET[3]*DRY[4]+WET[4]*DRY[3]+WET[5]*DRY[2]+WET[6]*DRY[1]
with this:
On 6/22/05, Christian Mora [EMAIL PROTECTED] wrote:
Dear list members;
Is there any trick to extract the coefficients along with std errors,
t-values and p-values for each beta from a gnls fit model (similar to the
results obtained using summary(lm)$coeff for linear models)?
The best way to
I have an R script that loops over market contracts. The script runs
well for markets with relatively small number of contracts but seg
faults when the number of contracts (loop iterations) is large.
Is there a way for me to monitor my objects and their sizes from
within the R script?
How can I
Weiwei Shi wrote:
Hi,
I have a text mining project and currently I am working on feature
generation/selection part.
My plan is selecting a set of words or word combinations which have
better discriminant capability than other words in telling the group
id's (2 classes in this case) for a dataset
Do RSiteSearch(ls.obj) and click on the first hit.
Andy
From: Omar Lakkis
I have an R script that loops over market contracts. The script runs
well for markets with relatively small number of contracts but seg
faults when the number of contracts (loop iterations) is large.
Is there a way
hel.search(object size) found a function object.size that should
do what you want.
spencer graves
Omar Lakkis wrote:
I have an R script that loops over market contracts. The script runs
well for markets with relatively small number of contracts but seg
faults when the
I'd like to define a class with a chron slot, but:
R require(chron)
R setClass(myclass, representation(datetime = chron))
[1] myclass
Warning message:
undefined slot classes in definition of myclass: datetime(class chron)
in: .completeClassSlots(ClassDef, where)
How should such a class be
I'm looking for software that makes plots such as fig 4 (a)-(e), fig 5 anf fig 7
of
Gray, Robert, Flexible Methods for Analyzing Survival Data Using Splines, with
Applications to Breast Cancer Prognosis, 1992, J Am Stat Assoc, pp 942-51.
In other words, I'm looking for software that takes
Wittner, Ben wrote:
I'm looking for software that makes plots such as fig 4 (a)-(e), fig 5 anf
fig 7
of
Gray, Robert, Flexible Methods for Analyzing Survival Data Using Splines,
with
Applications to Breast Cancer Prognosis, 1992, J Am Stat Assoc, pp 942-51.
In other words, I'm looking
Hi,
I know that Rsquare in glm or in non-linear models is wrong, but some people
like this.
How I make to estimate the Rsquare from a model ajusted with glmmPQL or
another GLMM?
Thanks for all
Ronaldo
--
A simplicidade é o último degrau da sabedoria.
-- Victor Hugo
--
| //
I am running R 2.1 on OSX 10.4 using the precompiled binaries/
Raqua.app. loadhistory() nor load history (from the history
'drawer') do NOT work. I can save history files and even see them in
a text editor just fine, but cannot load any information (even after
loading library(utils)).
I have a 'named expression' like
expr - expression(rep(1,d))
and would like to replace the argument d with say 5 without actually evaluating
the expression. So I try substitute(expr, list(d=5)) in which case R simply
returns expr which when I 'evaluate' it gives
eval(expr)
Error in
I understand how to sort a vector, but I could not find how to sort a
data frame or matrix by one variable (column). Could you give me some
examples? Thanks!
Ling
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
I did a very quick search of the archive and couldn't find a readily
available answer to this one:
I'd like to convert, for example:
c(a, b, a, b)
to
c(1, -1, 1, -1)
In the case of the first vector, it may be any length, but will always
only have two unique values. It must always be
Duh!
sub()
--Jake
On Jun 22, 2005, at 3:35 PM, Jake Michaelson wrote:
I did a very quick search of the archive and couldn't find a readily
available answer to this one:
I'd like to convert, for example:
c(a, b, a, b)
to
c(1, -1, 1, -1)
In the case of the first vector, it may be any
On Wed, 2005-06-22 at 14:34 -0700, Ling Jin wrote:
I understand how to sort a vector, but I could not find how to sort a
data frame or matrix by one variable (column). Could you give me some
examples? Thanks!
Ling
See the examples in ?order
HTH,
Marc Schwartz
This works
x-c(a, b, a, b)
x[x==a]-1
x[x==b]- -1
as.numeric(x)
[1] 1 -1 1 -1
Fra: [EMAIL PROTECTED] på vegne af Jake Michaelson
Sendt: on 22-06-2005 23:35
Til: R-help@stat.math.ethz.ch
Emne: [R] string/character to number
I did a very quick search of the
See RSiteSearch(sort.data.frame), or more generally, ?order.
Andy
From: Ling Jin
I understand how to sort a vector, but I could not find how to sort a
data frame or matrix by one variable (column). Could you give me some
examples? Thanks!
Ling
Note: sub() returns a character vector not a numeric vector. as.numeric()
will convert it.
Slightly slicker and faster is: 2*(z=='a')-1 where z is your vector,
c('a','b','a','b')
Cheers,
Bert
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jake
To do this in one step, it would be easier to use ifelse():
Chars
[1] a b a b
ifelse(Chars == a, 1, -1)
[1] 1 -1 1 -1
HTH,
Marc Schwartz
On Wed, 2005-06-22 at 15:46 -0600, Jake Michaelson wrote:
Duh!
sub()
--Jake
On Jun 22, 2005, at 3:35 PM, Jake Michaelson wrote:
I did a
You can do indexing by name:
x - c(a, b, a, b)
v - c(a=1, b=-1)
v[x]
a b a b
1 -1 1 -1
Andy
From: Jake Michaelson
Duh!
sub()
--Jake
On Jun 22, 2005, at 3:35 PM, Jake Michaelson wrote:
I did a very quick search of the archive and couldn't find a readily
available
On 6/22/05, Søren Højsgaard [EMAIL PROTECTED] wrote:
I have a 'named expression' like
expr - expression(rep(1,d))
and would like to replace the argument d with say 5 without actually
evaluating the expression. So I try substitute(expr, list(d=5)) in which
case R simply returns expr which
Is it b/c my question is too long so no one answers it? I should have
splitted it. :(
On 6/22/05, Kjetil Brinchmann Halvorsen [EMAIL PROTECTED] wrote:
Weiwei Shi wrote:
Hi,
I have a text mining project and currently I am working on feature
generation/selection part.
My plan is selecting a
Gabor Grothendieck [EMAIL PROTECTED] writes:
On 6/22/05, Søren Højsgaard [EMAIL PROTECTED] wrote:
I have a 'named expression' like
expr - expression(rep(1,d))
and would like to replace the argument d with say 5 without actually
evaluating the expression. So I try substitute(expr,
Hi all,
Does anybody know the easiest way to import excel data into R? I copied
and pasted the excel data into a txt file, and tried read.table, but R
reported that
Error in read.table(data_support.txt, sep = , header = T) :
more columns than column names
Thanks!
Ling
Your error message tells me that you have different numbers of fields
in different lines. You say you, copied and pasted the excel data into
a txt file. I usually copy what I want into a clean sheet then File -
Save, then File - Save As - Save as type = CSV (Comma delimited)
Hi
Uwe Ligges wrote:
Thomas Steiner wrote:
I color some area grey with polygon() (with a red border) and then I
want to have the dashed red border in the legend as well. How do I
manage it?
And I want to mix (latex) expressions with text in my legend.
Both points are not that easy
Ling,
You might take a look at the function read.xls() in gdata library.
HTH.
On 6/22/05, Ling Jin [EMAIL PROTECTED] wrote:
Hi all,
Does anybody know the easiest way to import excel data into R? I copied
and pasted the excel data into a txt file, and tried read.table, but R
reported that
I am trying to run a survival time regression (no time dependence so
exponential distribution) with a fairly large but not huge number of
right hand side variables (about 60).
r seems to not be able to estimate coefficients or standard errors
for many of the covariates but can for some of
Hi all,
I have a working package for linux, including fortran 95 code compiled with
g95,
that I need to port to OS X. The package works on Linux and seems to load on
the Mac,
but when I try to run a function that calls C or Fortran I'm told that the
symbol is not loaded.
I'm developing via a
Ling,
If any column has text with spaces between words, this will lead
to the more columns ... problem.
Delete the spaces and try again.
e.g., if the Excel file is
Var1Var2Var3
text1 2
more text 3 4
yet more5 6
and more7 8
blahblah
Dear All,
I want to change the default options of Rcmdr; it seemed to work when
I made changes and click the Exit and Restart R Commander. However,
next time I open Rcmdr, it automatically restored to the default
options. Is there a way to change Rcmdr's options permanently? Thanks!
Shige
77 matches
Mail list logo