Dear R-user:
Do you know any R package that could be use for fitting a Pattern-Mixture
models (PMM) please? I would appreciate if you could suggest me a R package for
fitting PMM.
Thank you very much,
Sincerely,
Sattar
Hi
Michael Lawrence wrote:
On 9/4/07, Sam Ferguson [EMAIL PROTECTED] wrote:
Thanks for your reply Bruno.
No - as I said, I know how to do that - the movie15 and the
multimedia package are basically the same, and it is relatively
straightforward to get an audio file into a pdf with them.
This should give you something close to what you want:
xyplot(Petal.Length ~ Petal.Width | Species, iris,
strip = strip.custom(par.strip.text = list(cex = 2)),
par.settings = list(layout.heights=list(strip=1.45)))
The par.settings argument alters locally the default par settings
Hi,
How can I extract part of an array? I would like to extract table
Supported from this array. If this is not possible, how do I convert
array to list? I'm sorry this is not an reproducible example.
spl - tapply(temp$var1, list(temp$var2, temp$var3, temp$var3), mean)
spl
, , Supported
On 9/4/07, Werner Wernersen [EMAIL PROTECTED] wrote:
Hi,
I am trying to capture the console output of program I
call via system() but that always returns only
character(0).
For example:
capture.output(system(pdflatex out.tex) )
will yield:
character(0)
and the output still written to
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Frede Aakmann Tøgersen schrieb:
This should give you something close to what you want:
xyplot(Petal.Length ~ Petal.Width | Species, iris,
strip = strip.custom(par.strip.text = list(cex = 2)),
par.settings =
Hi, everyone,
My question is: It's not every time that you can get a converged
result from the nls function. Is there any solution for me to get a
reasonable result? For example:
x - c(-0.06,-0.04,-0.025,-0.015,-0.005,0.005,0.015,0.025,0.04,0.06)
y -
On 9/5/07, Frede Aakmann Tøgersen [EMAIL PROTECTED] wrote:
This should give you something close to what you want:
xyplot(Petal.Length ~ Petal.Width | Species, iris,
strip = strip.custom(par.strip.text = list(cex = 2)),
par.settings = list(layout.heights=list(strip=1.45)))
The
Thanks for your reply, Bert - it was really helpful!
1. I have used a non-parametric test of variance (fligner.test) to test
whether the variances of my groups were equal or not, and they weren't.
2. Just quickly to see if I understand the weighting part - I calculate
the variance of my
On Wed, 5 Sep 2007, Gustaf Rydevik wrote:
On 9/4/07, Werner Wernersen [EMAIL PROTECTED] wrote:
Hi,
I am trying to capture the console output of program I
call via system() but that always returns only
character(0).
For example:
capture.output(system(pdflatex out.tex) )
will yield:
Below is one possibility:
If you knew MA you would get a regular linear
least-squares for parameters A,B and constant which
can be easily solved. So now you can define a function
f(MA) which returns that value. Now you must minimize
that f - a function of one argument. It can have
several local
Hi Leeds, Thanx for this reply. Actually I did not want to know whether any
differentiation is needed or not. My question was that : what is the difference
between two models :
arima(data, c(2,1,2))
and
arima(diff(data), c(2,0,2))
If I am correct then those two models
Adam Green wrote:
I am having trouble finding out how to adjust the position of labels on
pie charts. For the small wedges, many of the labels overlap making it
impossible to read. Is there any way to offset the labels so that they
don't overlap?
Hi Adam,
There are three ways to adjust
Lauri Nikkinen wrote:
Hi,
How can I extract part of an array? I would like to extract table
Supported from this array. If this is not possible, how do I convert
array to list? I'm sorry this is not an reproducible example.
spl - tapply(temp$var1, list(temp$var2, temp$var3, temp$var3),
Deepayan Sarkar [EMAIL PROTECTED] writes:
On 9/4/07, Patrick Drechsler [EMAIL PROTECTED] wrote:
what is the correct way of removing the top and right axes
completely from a lattice xyplot? I would like to have a plot similar
to using the bty=l option for traditional plots.
There is no
On 9/4/07, Christoph Heibl [EMAIL PROTECTED] wrote:
Hi list,
The function is.integer tests if an object is of type integer:
see e.g.:
is.integer(12) # FALSE
is.real(12) # TRUE
mode(12)# numeric
But how can I test if a number is actually an integer? R seek is
Dear R users,
I've got a serious problem running some gee functions, and I really can't
fix it. My dataframe is made of several rows and columns (say 7600 x 15),
like the one below:
header inr . inside group_cod
1 2.25 0 1
1
On Wed, 5 Sep 2007, Megh Dal wrote:
Hi Leeds, Thanx for this reply. Actually I did not want to know whether
any differentiation is needed or not. My question was that : what is the
difference between two models :
arima(data, c(2,1,2))
and
arima(diff(data), c(2,0,2))
If I am
This looks like exactly what i want!! Thanks!
Jim Lemon-2 wrote:
yoo wrote:
Hi, let's say I have data
x = c(1, 2, 10, 12)
y = c(100, -20, 50, 25)
if I go plot(x, y), then the default x-axis range goes from 1 to 12. Is
there a way to change it so that the axis looks like:
You may also want to look at the cnvrt.coords function in the TeachingDemos
package. It may be a bit simpler than mixing grid and base.
-Original Message-
From: Sébastien [EMAIL PROTECTED]
To: Prof Brian Ripley [EMAIL PROTECTED]
Cc: R-help r-help@stat.math.ethz.ch
Sent: 9/3/07 7:46 PM
Dear all
I try to run the code as follows,
test.model-nls(y~exp(A)*(x-PMA)^4+exp(B)*(x-PMA)^2+Const,
data=test,
start=list(A=8,B=5,Const=10,PMA=0),
control=nls.control(maxiter = 50,minFactor=1/1048),
trace=TRUE)
But how can i build a selfSart, since i have much data ?
Thanks for your help
I want to interpole a functione by a spline interpolation and i want to know
if i can force, with any function or parameter, the interpolation to be
monotonic.
Thanks all
--
View this message in context:
http://www.nabble.com/Spline-tf4384168.html#a12498336
Sent from the R help mailing list
Dear all,
I would like to know how can I compute the length of a string in a dataframe.
Example:
SEQUENCE ID
TGCTCCCATCTCCACGGHR04FS00645
ACTGAACTCCCATCTCCAAT HR0595847847
I would like to know how to compute the length of each SEQUENCE.
sLengths - with(dataFrame, nchar(as.character(SEQUENCE)))
Bill Venables
CSIRO Laboratories
PO Box 120, Cleveland, 4163
AUSTRALIA
Office Phone (email preferred): +61 7 3826 7251
Fax (if absolutely necessary): +61 7 3826 7304
Mobile: +61 4 8819 4402
Home Phone:
Hans,
I think your problem is that you don't use the variable which takes different
values in your if statement your i changes values and has really nothing
to do with your x variable (except the length part ). Also all the other
variables need to be declared somehow - otherwise how
How's this?
x = data.frame(ID=c(asdf,asdfasdf),1:2)
x
ID X1.2
1 asdf1
2 asdfasdf2
nchar(as.character(x$ID))
[1] 4 8
Assuming ID is a factor, if not, you can remove the as.character().
On 9/5/07, João Fadista [EMAIL PROTECTED] wrote:
Dear all,
I would like to know
João Fadista wrote:
Dear all,
I would like to know how can I compute the length of a string in a dataframe.
Example:
SEQUENCE ID
TGCTCCCATCTCCACGGHR04FS00645
ACTGAACTCCCATCTCCAAT HR0595847847
I would like to know how to
On 9/5/07, João Fadista [EMAIL PROTECTED] wrote:
I would like to know how can I compute the length of a string in a dataframe.
Example:
SEQUENCE ID
TGCTCCCATCTCCACGGHR04FS00645
ACTGAACTCCCATCTCCAAT HR0595847847
I would like to know
Hi,
sapply(levels(df[,SEQUENCE]), nchar)
Where 'df' is your data.frame
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40 S 49° 16' 22 O
On 05/09/07, João Fadista [EMAIL PROTECTED] wrote:
Dear all,
I would like to know how can I compute the length of a string in a
dataframe.
On 05-Sep-07 13:50:57, João Fadista wrote:
Dear all,
I would like to know how can I compute the length of a string in a
dataframe. Example:
SEQUENCE ID
TGCTCCCATCTCCACGGHR04FS00645
ACTGAACTCCCATCTCCAAT HR0595847847
I would like
Hi,
I have a matrix of data which i can vizualize as an image - for example. I
would like to save this image as a geotiff file or at a tiff file with a world
file which holds the projection of my data (ultimately the data represent a map
of some sort). I know i can save the data as an ESRI
As long as you keep in mind Prof. Ripley's comment, you're going to
be fine with nchar().
http://tolstoy.newcastle.edu.au/R/e2/devel/07/05/3450.html
Remember that what you want exactly is given by nchar(obj,
type=chars), which is **NOT** the default on R 2.5.1 (only on
R-2.6.0).
In your
Dear Sirs:
I am trying to simulate a ARMA multivariate model using
AR-array(c(1,0.5,0,0.1,0,0.4,1,0.8),c(2,2,2))
mod- ARMA(A=AR, B=diag(1,2),C=NULL)
y-simulate(mod,sampleT=100)
in the package dse1, but how can I specify the covariance matrix for the
noise of the model? and does the
Hi everyone,
I'm hoping you can give me some pointers. I have a requirement to draw
multiple (103) xy line plots onto one output device. Ideally the plots
should be displayed in a hexagonal grid (example at
www.maladmin.com/example.jpg). I can calculate the locations for each
waveform but am
D. R. Evans said the following at 09/04/2007 04:14 PM :
I am 100% certain that there is an easy way to do this, but after
I have reconsidered this and now believe it to be essentially impossible
(or at the very least remarkably difficult) although I don't understand why
it is so :-(
At least, I
On Tue, 4 Sep 2007, [EMAIL PROTECTED] wrote:
I am new to R. I would like to calculate bootstrap confidence intervals
using the BCa method for a parameter of interest. My situation is this: I
already have a set of 1000 bootstrap replicates created from my original
data set. I have already
Sorry, I did not think about the nested design (did not read carefully enough).
Another thing to try (untested) is to create a column of 1's and include that
specifically and exclude the default intercept, then your column of 1's acts as
the intercept, but a p-value is returned from it.
Note
On 9/5/07, Tom Wright [EMAIL PROTECTED] wrote:
Hi everyone,
I'm hoping you can give me some pointers. I have a requirement to draw
multiple (103) xy line plots onto one output device. Ideally the plots
should be displayed in a hexagonal grid (example at
www.maladmin.com/example.jpg). I can
Hello, i have a little problem with R and i hope you can help me.
I want to use splines to estimate a function but i want to force the
interpolation to be monotone. Is this possible with R ?
Thank you,
Rémi.
-
[[alternative
Here is one way of getting a reasonable fit:
1. Scale your y's by dividing all values by 1e6.
2. Plot x vs. y. The plot looks like a quadratic function.
3. Fit a quadratic const. + B*x^2 - this a linear regression problem so
use lm.
4. Plot the predictions.
5. Eyball the necessary shift -
Hi, everyone,
I haven't found anything similar in the forum, so here's my problem (I'm no
expert in R nor statistics):
I have a data set of 59.000 cases with 9 variables each (fractional
coverage of 9 different plant types, such as deciduous broad-leaved
temperate trees or evergreen tropical
Barbara Diane-Spillmann wrote:
dear all,
does anybody know if cor.test with method=kendall calculates kendalls
tau a b or c? I need to get p values for kendalls tau c...
May I ask what the difference between Kendall's tau a, b and c is? Any
references?
Uwe Ligges
thank you very much
Greg,
This is great, exactly what I was looking for.
Thanks.
Rich
-Original Message-
From: Greg Snow [EMAIL PROTECTED]
Sent: Aug 31, 2007 2:55 PM
To: Richard Yanicky [EMAIL PROTECTED], Uwe Ligges [EMAIL PROTECTED]
Cc: r-help@stat.math.ethz.ch
Subject: RE: [R] Single plot multiple
How do I get a grouped data object to use the level names from the input
data set?
first I gave the levels some names like this:
male -factor(male)
levels(male) - c(“Girls”,”Boys”)
Then I created a groupdedData object but the male variable in not part
of the grouping formula.
Then I fit an
?mapply
mapply('+', a, b, SIMPLIFY=FALSE)
colSums(mapply('+', a, b))
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
I have created a list of matrices using sapply or lapply and wish to extract
each of the matrices as a matrix. Some of them are 2x2, 3x3, etc.
I can do this one at a time as:
M1-as.matrix(D[[1]])
How can repeat this process for an unknown number of entries in the list? In
other words, how
Hi Christoph,
I'm not exactly sure what you're looking for, but I'll take a stab
anyway.
The trees in a random forest is not designed to be interpreted as one
would
with an ordinary tree. There are several things you may try to see if
they help you any. One is the distribution of votes. It
HI all,
I'm trying (unsuccessfully) to add the degree symbol to each line of
text in my legend (within xyplot).
Here is the line of code, which fails to interpret the expression
function:
auto.key =list(points =
FALSE,text=paste(levels(as.factor(divertSST2$temp)),expression(degree)).
..),
I just
You could make multiple calls to the rug function using a different
color for each call. Using tapply or by may automate this for you.
Another option would be to create your own rug using the segments
function (which will plot multiple colors).
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
On 9/5/07, Folkes, Michael [EMAIL PROTECTED] wrote:
HI all,
I'm trying (unsuccessfully) to add the degree symbol to each line of
text in my legend (within xyplot).
Here is the line of code, which fails to interpret the expression
function:
auto.key =list(points =
If your main goal is to do a loess fit, then make predictions from that,
then using the 'get' function may do what you want:
tmp.var - get(ORDINATE)
lo - loess(percent ~ ncms * tmp.var, d, ...
grid - expand.grid(tmp.var=MINVAL:MAXVAL, ncms=MINCMS:MAXCMS)
predict(lo, grid)
Here you stick with
Take a look at the my.symbols function in the TeachingDemos package.
The last example shows how to create a hexagonal grid and the 2nd to
last example shows how to plot several small line plots onto a larger
plot. Combining these 2 examples should give you what you want.
Hope this helps,
--
You get the number of list elements with length(D),
the dimensions of M1 with dim(M1)
see help with:
?dim
?length
Hope this helps...
I have created a list of matrices using sapply or lapply and wish to
extract each of the matrices as a matrix. Some of them are 2x2, 3x3, etc.
I can do this
For the column names of the result of expand.grid(), I would just assign
them the values I wanted, like this:
x - expand.grid(tmp=1:3,y=1:2)
x
tmp y
1 1 1
2 2 1
3 3 1
4 1 2
5 2 2
6 3 2
colnames(x)[1] - whatever
x
whatever y
11 1
22 1
33 1
4
I am trying to specify a round off error distribution, but I am not sure
what the variance of round off error would be for R. Does anyone have a
suggestion? Thanks
Todd Remund
(435) 863-8172
Science Engineering
[[alternative HTML version deleted]]
Hello
I have a question about how I can include an array dataset inside a
package. In our package, one R function is designed to take an array
of 2 rows * 2 columns * k levels as input data enter by the user,
where k is positive integers. I am trying to include a 3-D array of
2-by-2-by-8
Please read
http://cran.r-project.org/doc/manuals/R-exts.html
especially Section 1.1.3. Use save to create an Rdata file.
Max
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Wallace Hui
Sent: Wednesday, September 05, 2007 4:18 PM
To:
Thanks to Deepayan...again, for suggesting parse.
Here is how I added the degree symbol to a vector of text for my xyplot
legend:
auto.key =list(points = FALSE,text=parse(text =
paste(levels(as.factor(divertSST2$temp)), *degree, sep = ))),
For me the tricky part was learning about adding the
If they are already a matrix in the list, then you don't have to use
'as.matrix'; you can just say:
M1 - D[[1]]
Now the question is, what do you mean by how do you index M1? Do you
want to go through the list applying a function to each matrix? If
so, then just 'lapply'. For example, to get
Dear R-helpers,
Lists in R are stumbling block for me.
I kindly ask you to help me able to write a
data-frame.
I have a list of lists.
sls[1:2]
$Andromeda_maya1
x y
[1,] 369 103
[2,] 382 265
[3,] 317 471
[4,] 169 465
[5,] 577 333
$Andromeda_maya2
x y
[1,] 173 507
[2,]
Try this:
sls - list(a=matrix(sample(10), ncol=2, dimnames=list(NULL, c('x', 'y'))),
+ b=matrix(sample(16), ncol=2, dimnames=list(NULL, c('x', 'y'
sls
$a
x y
[1,] 8 2
[2,] 9 10
[3,] 4 1
[4,] 5 7
[5,] 3 6
$b
x y
[1,] 4 14
[2,] 3 15
[3,] 16 5
[4,] 1 9
[5,] 8 7
This is partly an R and partly a general statistics question.
I'm trying to get confidence intervals of proportions (sometimes for
subgroups) estimated from complex survey data. Because a function like
prop.test() does not exist for the survey package I tried the following:
1) Define a survey
Dear R Users,
I am hoping you can help me.
I have received code from a colleague who uses Matlab. I need to
translate it into R.
I am wondering if there is a randomization t-test (from non-parametric
statistics) function already defined in R.
(In Matlab the function is randtest.m.)
On Wed, 5 Sep 2007, [EMAIL PROTECTED] wrote:
Dear R Users,
I am hoping you can help me.
I have received code from a colleague who uses Matlab. I need to
translate it into R.
I am wondering if there is a randomization t-test (from non-parametric
statistics) function already defined in R.
Hello,
I read in a tab delimited text file via mydata = read.delim(myfile). The text
file was originally an excel file where . was used in place of 0. Now all the
columns which should be integers are factors. Any ideas how to change all the .
to 0 and factors back to integer?
Thanks a lot
Here is one way. You might want to read in the data with 'as.is=TRUE'
to prevent conversion to factors.
x - data.frame(a=c(1,2,3,'.',5,'.'))
str(x)
'data.frame': 6 obs. of 1 variable:
$ a: Factor w/ 5 levels .,1,2,3,..: 2 3 4 1 5 1
# replace '.' with zero; either readin with 'as.is=TRUE'
Dear All:
I need to have some data frame objects.
First aa object:
pH Formulation time Subject
[1]1.2 F 0 1
[2]7.4 S 1 2
[3]MF 2 3
[4] 3 4
[5] ni
Then, I need to produce 2*3(pH*formulation)
On a ubuntu linux computer (Feisty, i386), I compile R and additional
packages from source. The compiler is gcc 4.1.2.
The problem is, I can run sudo R and successfully compile all
packages (e.g., MASS, lattice) except rggobi. The error seems to be
in display.c. My ggobi is in /usr/local/,
On Wed, 5 Sep 2007, Greg Snow wrote:
?mapply
mapply('+', a, b, SIMPLIFY=FALSE)
colSums(mapply('+', a, b))
or
sapply( a, sum ) + b * sapply( a, length )
or even
sapply( a, sum ) + b * 2
if all list components in 'a' are of length 2.
Then there are the do.call( cbind , a )
69 matches
Mail list logo