Yong Wang :
Dear R users
I get a weired problem when use sink:
since the data set pretty big, I sink intermediate result for further
use,following
lines are consistently used when write data
###
sink(dataname.txt)
data
sink()
##
at first
Laura Holt wrote:
Hi R people:
I have created a new class for a project that I am working on. It works
fine.
Just one question, please: When I access the slots, is there any way
that I could use
x$Name instead on [EMAIL PROTECTED], please? Or is it that way by design,
please?
This
Fang Lily wrote:
Dear list,
I am working on a project of simulating normal distributed data in
R. Would you please show me some coding especially regarding how to do
the circling?
Thanks,
Lily
__
R-help@stat.math.ethz.ch mailing
[EMAIL PROTECTED] wrote:
Dear all,
I wrote the following batch script on a iMac, and ran it on a linux
mosix cluster.
tu - read.table(cage.mm5.tags.rna_lib.CAA-CAJ.tu-reshape.table)
tu_reshaped - t(reshape(tu[1:50,], direction=wide, timevar=tu,
idvar=c(rna,lib)))
write.table(tu_reshaped,
ronggui wrote:
library(lattice)
dotplot(variety ~ yield | site, data = barley, groups = year,
key = simpleKey(levels(barley$year), space = right),
xlab = Barley Yield (bushels/acre) ,
aspect=0.5, layout = c(1,6), ylab=NULL)
and i get the plot whose
It
is
really
hard
to
read
your
message.
Anyway,
I
guess
you
are
looking
for
?reshape
Uwe Ligges
jose silva wrote:
Dear all:
I have this:
A1 B1 C1 D1 E1
A2 B2 C2 D2 E2
A3 B3 C3 D3 E3
And I want this
A1 E1
Just a note to thank everybody who responded to my question.
Much appreciated!
Jacob
Jacob L van Wyk
Department of Mathematics and Statistics
University of Johannesburg APK
P O Box 524
Auckland Park 2006
South Africa
Tel: +27-11-489-3080
Fax: +27-11-489-2832
for some reason the following message seems not to have reached the list
in the first try, at least I can't find it. my apologies if this is my
fault:
we are running R under Solaris with SunRay Terminals, which are set to 8
bit color to comply with some other software. In this configuration,
1. According to the doc of PAMR, the shrinkage
threshold is determined by cross-validation. Does this
mean that user need not tune any parameter?
2. I tried two applications using PAMR, the results
are very disappointing. The attached are the
cross-validation results. You can see that the
On Tue, May 31, 2005 at 11:47:05PM +0100, Gavin Simpson wrote:
Manuel Morales wrote:
Hello list.
I'm using R from the gnome-terminal in Fedora. My preference is to write
programs in VIM, and then source the file from R, or copy and paste the
lines into the console. I'm wondering if there is
Hi, list,
I have got a dataset on soil and plant. I would like to fit a glm to my
data. My response variable is percentage data. That is percent of plant root
length colonized by Arbuscular micorrhiza fungi. Because of the nature of my
data, I am not quite sure whether gamma or gaussian
hi !
is there an emacs mode for .r code ?
thanks
erik
__
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
http://ess.r-project.org/Manual/ess.html
On Jun 1, 2005, at 5:46 AM, Flatman wrote:
hi !
is there an emacs mode for .r code ?
thanks
erik
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
Hi,
Check out the ESS site, http://stat.ethz.ch/ESS/
Cheers,
Kev
Flatman wrote:
hi !
is there an emacs mode for .r code ?
thanks
erik
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
hi everybody,
is there a canonical way to get hold of the trace=TRUE output from
nls, i.e. to copy it to a R variable (or at least to an external log file)?
I have only found the possibility to fix(nlsModel) (and than the
correct copy of that: namespace function ...) within the R-session by
Hi,
i would like transfrom
characters from a data.frame to factors automatic.
tofac - function(df){
+ i=0
+ repeat{
+ i - i+1
+ if(!is.character(df[,i]))
+ next
+ df[,i] - as.factor(df[,i])
+ print(i)
+ if(i == length(df))
+ break }
+ }
tofac(abrdat)
[1] 7
[1] 8
[1] 9
[1] 11
[1] 13
[1] 15
Jan T. Kim wrote:
On Tue, May 31, 2005 at 11:47:05PM +0100, Gavin Simpson wrote:
Manuel Morales wrote:
Hello list.
I'm using R from the gnome-terminal in Fedora. My preference is to write
programs in VIM, and then source the file from R, or copy and paste the
lines into the console. I'm
Hello,
I wish to customize the tick marks and labels of axes in panels produced by
high-level lattice functions, namely xyplot. I know I can use the scales
argument to specify values for rot, cex, etc. in the top-level call.
However, I am interested in determining values for cex and rot based on
An interesting thought just came to me when reading this discussion! I
use both R and Latex and have never had the trouble of overlooking error
messages when debugging long Latex code!
Of course this is because when compiling a latex document, a summary of
the compilation process is provided
Hello there!
When I do freq=F on hist, I get on the left a small number, what exactly
does that mean?
Thanks,
Martin
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
Martin Klaffenboeck wrote:
Hello there!
When I do freq=F on hist, I get on the left a small number, what exactly
does that mean?
Thanks,
Martin
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
Sander Oom wrote:
An interesting thought just came to me when reading this discussion! I
use both R and Latex and have never had the trouble of overlooking error
messages when debugging long Latex code!
Of course this is because when compiling a latex document, a summary of
the compilation
Mäkinen Jussi wrote:
Hello,
I'm happy with the modified ifelse:
ifelse.o - function (test, yes, no)
{
storage.mode(test) - logical
ans - test
nas - is.na(test)
if (any(test[!nas]))
ans[test !nas] - rep(yes, length.out = length(ans))[test
!nas]
if
Dears,
I know a little about Object Pascal language and I've been working (in the last
two years) with the Tinn-R development (www.sciview.org/Tinn-R).
This work started adapting Tinn (a good frame, but with limitations) as an R
script editor.
Tinn is a small ASCII file editor primarily
Gavin Simpson wrote:
snip
freq: logical; if 'TRUE', the histogram graphic is a representation
of frequencies, the 'counts' component of the result; if
'FALSE', _relative_ frequencies (probabilities), component
'density', are plotted. Defaults
Indeed it does! Sorry for the impulsive response!
Sander.
Duncan Murdoch wrote:
Sander Oom wrote:
An interesting thought just came to me when reading this discussion! I
use both R and Latex and have never had the trouble of overlooking
error messages when debugging long Latex code!
Of
Hello!
Is it possible to use R time series to identificate a process which is
subjected to known input? I.e. I have 2 sequences - one is measurements
of black box's state and the second is the force by which this black
box is driven (which is known too) and I want to fit thist two series
with
Berton Gunter [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
summary() is an S3 generic that for your vector dispatches
summary.default(). The output of summary default has class table and so
calls print.table (print is another S3 generic). Look at the code of
print.table() to see
On 6/1/05, Earl F. Glynn [EMAIL PROTECTED] wrote:
Berton Gunter [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
summary() is an S3 generic that for your vector dispatches
summary.default(). The output of summary default has class table and so
calls print.table (print is another
Dear R users,
Is it possible to force a hard return in an expression. I tried including
one for a legend using an expression and it didn't work. Here is my code,
legend(12, 0.10, c(Fitted density,
as.expression(substitute(paste(Weibull (, alpha==shapeU, , ,
beta==scaleU,) Mean = ,meanU,
Thanks Duncan,
For pointing this out. You maybe saved my day. I agree that these results are
neither something I would like to see. I changed the code to be:
ifelse.o - function (test, yes, no)
{
storage.mode(test) - logical
ans - test
nas - is.na(test)
if (any(test[!nas]))
Dear List,
I am thinking about ways in which I might analyse some stratigraphic
data. The nature of the data series I have generates a number of issues:
1) The data I have in mind come from a sediment core sequence taken from
the bottom of a lake. The sequence is sliced into a priori defined
I have spatial data on various species of trees within plots. What I'd like to
know is if their patterns are positively associated or not. Could I use
cor.test on the values generated by Kest or Gest functions? or would it be more
powerful to do a G i to j and then G j to i analysis instead?
luan_sheng wrote:
Yong Wang :
Dear R users
I get a weired problem when use sink:
since the data set pretty big, I sink intermediate result for further
use,following
lines are consistently used when write data
###
sink(dataname.txt)
data
sink()
joerg van den hoff wrote:
hi everybody,
is there a canonical way to get hold of the trace=TRUE output from
nls, i.e. to copy it to a R variable (or at least to an external log file)?
I have only found the possibility to fix(nlsModel) (and than the
correct copy of that: namespace function
R-help,
I want to keep the original y-axis limits in panels when drawing
lattice plots.
My data contain some few large values making dificult to see any
patterns/trends in different plots.
What I want to do is to keep the original scale (y-axis) in every
single panel.
I have searched in the
Dear R-helper,
How could I count only some variable was exist after running sample
(random) function.
For example,
testx - factor(c(Game,Paper,Internet,Time,Money))
for(i in 1:2) {
+x - sample(testx,replace=TRUE)
+print(x)
+}
[1] MoneyMoneyTime Internet Time
See ?xyplot and read about the scales argument.
Luis Ridao Cruz wrote:
R-help,
I want to keep the original y-axis limits in panels when drawing
lattice plots.
My data contain some few large values making dificult to see any
patterns/trends in different plots.
What I want to do is to keep the
Dear R-helper,
How could I count only some variable was exist after running sample
(random) function.
?
For example,
testx - factor(c(Game,Paper,Internet,Time,Money))
for(i in 1:2) {
+x - sample(testx,replace=TRUE)
+print(x)
+}
[1] MoneyMoneyTime
Dear R-helper,
How could I count only some variable was exist after running sample
(random) function.
Or is this what you want?
Tab - table(sample(testx, replace=TRUE))
Tab[ Tab 0 ]
For example,
testx - factor(c(Game,Paper,Internet,Time,Money))
for(i in 1:2) {
+x -
Dear Christian
If you create your data frame by using data.frame all characters
are automatically transformed into factors unless you force them
to stay a character. Maybe that can solve your problem easily.
dat - data.frame(a=1:10, b=letters[1:10])
str(dat)
`data.frame': 10 obs. of 2
On Wed, 1 Jun 2005 [EMAIL PROTECTED] wrote:
Dear all,
I wrote the following batch script on a iMac, and ran it on a linux
mosix cluster.
tu - read.table(cage.mm5.tags.rna_lib.CAA-CAJ.tu-reshape.table)
tu_reshaped - t(reshape(tu[1:50,], direction=wide, timevar=tu,
idvar=c(rna,lib)))
Vumani Dlamini wrote:
Dear R users,
Is it possible to force a hard return in an expression. I tried
including one for a legend using an expression and it didn't work. Here
is my code,
legend(12, 0.10, c(Fitted density,
as.expression(substitute(paste(Weibull (, alpha==shapeU, , ,
It is not at all clear what you want to do. One conjecture
(attempt at reading your mind):
X_t = ``black box's state'' at time t
f_t = ``force'' at time t
Proposed model e.g. AR(3):
X_t = phi_1 * X_{t-1} + phi_2 * X_{t-2}
+ phi_3 *
On Wed, 1 Jun 2005 17:05:52 +0200 Sofyan Iyan wrote:
Dear R-helper,
How could I count only some variable was exist after running sample
(random) function.
I'm not completely sure what you want, but maybe you want to look at
table() and try print(table(x)) instead of print(x). Those levels
Or perhaps
f - factor(letters[1:2], levels=letters[1:3])
f
[1] a b
Levels: a b c
levels(f[, drop=TRUE])
[1] a b
Andy
From: TEMPL Matthias
Dear R-helper,
How could I count only some variable was exist after running sample
(random) function.
Or is this what you want?
Tab -
sink() isn't behaving as i expect, when used inside a function, eg:
x-data.frame(F=c(O,O))
f-foo.txt
sink(f); format(x); sink(); # foo.txt looks great!
foo-function(x,f) { sink(f); format(x); sink(); }
foo(x,f=f) # foo.txt is empty!
why is this, and how can i successfully sink()
Hi, listers:
I am really in need for some good books on financial market analysis,
better with R. Can anyone help?
Thanks.
weiwei
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
Dear R Friends ,
I want to name my variables( more than 2 variables in a single plot) within a
plot to distinct them from each other, but I cann't. How it is possible? I
don't mean x and y axis using xlab or ylab. At the below , it follows some
lines, only as an example that you could try
I'm sorry, but is there anything I can do to remedy this? I reinstalled
R and BioConductor, and the error still occurs.
Thanks you any advice.
Matt
On May 31, 2005, at 12:03 PM, Thomas Lumley wrote:
On Tue, 31 May 2005, Matt McCall wrote:
*** malloc[477]: Deallocation of a pointer not
Thanks for your help.
How about if I count all. This below I have fixed my code which used
table. I need the result:
Game InternetMoneyPaper Time
41 140
Regards, Sofyan
testx - factor(c(Game,Paper,Internet,Time,Money))
Dear Amari
Why not use legend?
y- c(1:100)
x1-seq(0.1,10, by=0.1)
x2-seq(0.5,50,by=0.5)
mydata- data.frame( y=y, x1=x1, x2=x2)
matplot(mydata, type = l ,xlab=Time,ylab=MSE , col = 1:3, lty = 1:3)
legend(10,90,c(line1, line2, line3), col = 1:3, lty = 1:3)
You can work with text to place any
On 6/1/05, Amir Safari [EMAIL PROTECTED] wrote:
Dear R Friends ,
I want to name my variables( more than 2 variables in a single plot) within a
plot to distinct them from each other, but I cann't. How it is possible? I
don't mean x and y axis using xlab or ylab. At the below , it
I would not use gamma or gaussian for a proportion. If the
percentages were success or failure rate out of a known number of
trials, then I'd try function glm with family = binomial or
quasibinomial. However, percent of plant root length colonized does
not sound to me like glm would be
Thank you very much for clearing my question (for me too ;))
The model I would like to fit is :
X_t = phi_1 * X_{t-1} + phi_2 * X_{t-2}
+ phi_3 * X_{t-3} +
A_1*f_{t-1}+A_2*f_{t-2}...+A_k*f_{t-k} + E_t (*)
(X_t and f_t time series are both known, k - fixed and more
I am interested in stock market. My model is built on s/p500.
Sorry for the uncleaness.
weiwei
On 6/1/05, Weiwei Shi [EMAIL PROTECTED] wrote:
Hi, listers:
I am really in need for some good books on financial market analysis,
better with R. Can anyone help?
Thanks.
weiwei
--
Weiwei
I have been using the rgenoud package for a nonlinear least-squares
problem with lots of local minima, and it works very well but takes lots
of time. According to the article refrenced in the documentation, the
original GENOUD-software by the same authors seems to allow for
user-supplied
On Jun 1, 2005, at 10:23 AM, Rolf Turner wrote:
foo-function(x,f) { sink(f); print(format(x)); sink(); }
many thanks! doh ;)
?format is unclear on return value imho.
--
-jon
__
R-help@stat.math.ethz.ch mailing list
Your question is kind of broad, but two books I like are Statistical
Analysis of Financial Data in S-Plus by Rene A. Carmona (Springer)
and Modeling Financial Time Series With S-Plus by Eric Zivot and
Jiahue Wang. The last one is an Insightful publication and is
basically the user's guide for
I can't get the scales parameter in xyplot of lattice to work as I
expected. I'm using R-2.1.0 and lattice 0.11-8. There should be year
labels from 1992 to 2004 for the x axis in the plot below, but instead
only a few of them appear, and in the wrong spots, as if the coordinate
system has
Jon Stearley wrote:
On Jun 1, 2005, at 10:23 AM, Rolf Turner wrote:
foo-function(x,f) { sink(f); print(format(x)); sink(); }
many thanks! doh ;)
?format is unclear on return value imho.
?format does describe the return value, though in the Details section
rather than in Value:
On Wed, 1 Jun 2005, Matt McCall wrote:
I'm sorry, but is there anything I can do to remedy this? I reinstalled R and
BioConductor, and the error still occurs.
The error appears to be caused by trying to write to a file that you don't
have write permission for. The work-around is not to do
I'm trying to select a subset of a dataframe while
dropping some factors. While the dataset gets smaller
all Factor levels remain and I need to get rid of
them. Strangely enough, I am almost certain that the
same code on the same data worked OK earlier today -
and it is not the first time that
I'm running a negative binomial model in zelig and
it's asking me to supply starting values for the
coefficients. How do I supply these? Could I use the
coefficients from the poisson model (which runs
smoothly)?
z.out - zelig(postSpmtsQ ~ (ante62Q + ante08Q +
ante29Q + ante16Q) * Trt, model =
Hi, Mikkel;
The problem here, I think, is that spray$PD is NOT recognized as character
in R. Actually, R understands it as factors according to your printout. This
happens quite a lot if you use read.table and come across characters within
the data file. One remedy I use often use is doing
Hello,
I cannot find how to avoid drawing tick marks on the opposite side of axes
in xyplot (lattice package). Say you have a simple plot:
x - y - rnorm(10)
xyplot(y ~ x)
There are tick marks on the top and right axes. Is it possible to turn off
drawing of those tick marks, or even turn off
the argument drop =TRUE is not meant to do that (see several responses from
Peter Dalgaard about this issue i.e.
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/37333.html)
If you want to drop unused factor levels try:
sprayS$PD-factor(sprayS$PD)
Cheers
Francisco
From: Mikkel Grum [EMAIL
On 6/1/05, Mikkel Grum [EMAIL PROTECTED] wrote:
I'm trying to select a subset of a dataframe while
dropping some factors. While the dataset gets smaller
all Factor levels remain and I need to get rid of
them. Strangely enough, I am almost certain that the
same code on the same data worked OK
On Wednesday 01 June 2005 13:04, Sebastian Luque wrote:
Hello,
I cannot find how to avoid drawing tick marks on the opposite side of axes
in xyplot (lattice package). Say you have a simple plot:
x - y - rnorm(10)
xyplot(y ~ x)
There are tick marks on the top and right axes. Is it possible
...many thanks to clarify for me some things!
christian
Dear Christian
If you create your data frame by using data.frame all characters
are automatically transformed into factors unless you force them
to stay a character. Maybe that can solve your problem easily.
dat - data.frame(a=1:10,
I'm playing around with Gmulti and have created the appropriate marked point
planar pattern (or it tells me that it is anyway), but when I go to use Gmulti,
I get a I and J must be logical vectors error. Can anyone explain to me why
this is?
My code is something like:
test - getBigPPP(1994,
On Wednesday 01 June 2005 12:12, Waichler, Scott R wrote:
I can't get the scales parameter in xyplot of lattice to work as I
expected. I'm using R-2.1.0 and lattice 0.11-8. There should be year
labels from 1992 to 2004 for the x axis in the plot below, but instead
only a few of them appear,
I can't get the scales parameter in xyplot of lattice to work as I
expected. I'm using R-2.1.0 and lattice 0.11-8. There should be
year
labels from 1992 to 2004 for the x axis in the plot below, but
instead
only a few of them appear, and in the wrong spots, as if the
coordinate
Hello-
I am relatively new to the R community and have been playing with the
program for about a month. Last week I switched my operating system
to Tiger (Mac OS 10.4). Since then (I think) I have been unable to
save scripts and get a message as follows in the R console:
2005-06-01
Hi all,
I am trying to bootstrap a small data set into 1000 pseudodatasets and
then run an ANOVA on each one. Can anyone provide guidance on how I could
do this?
Thank you.
-Dan Janes
Dan Janes, Ph.D.
Harvard University/OEB
26 Oxford St.
On Wednesday 01 June 2005 05:43, Pikounis, Bill [CNTUS] wrote:
Hello,
I wish to customize the tick marks and labels of axes in panels produced by
high-level lattice functions, namely xyplot. I know I can use the scales
argument to specify values for rot, cex, etc. in the top-level call.
Fabrice,
Which version of R/R.app are you using? If you're not using the
latest version (R-2.1.0a.dmg),
can you upgrade and try it again?
Rob
On Jun 1, 2005, at 12:38 PM, Fabrice De Clerck wrote:
Hello-
I am relatively new to the R community and have been playing with
the program for
Hello all,
I have data:
Genes time rep vart dye y trt
130911 sa1-d07 030min 1 col g 9.636244 o
145771 sa1-d07 030min 1 col r 8.107577 c
93335sa1-d07 030min 1 ler g 7.409566 o
94821sa1-d07 030min 1 ler r 5.107160 c
10119101 sa1-d07
Dan Janes djanes at oeb.harvard.edu writes:
Hi all,
I am trying to bootstrap a small data set into 1000 pseudodatasets and
then run an ANOVA on each one. Can anyone provide guidance on how I could
do this?
Thank you.
-Dan Janes
Hello,
I am trying to understand how to utilize the mvr function in the pls
Package of R. I am utilizing the R pls Package document dated 18 May 2005
as guidance. My data set consists of a 12 x 12 data frame created from
reading in a table of values. I have read the data in via the
I would like to get R2 (and and adjusted R2) from an lm. I know I can
compute R2 (SSreg/SStotal), but it would be nice to know if I could get
if automatically, e.g.
fit1-lm(y~x)
Rsq-fit1$rSquare.
R2.1.0 Patched under Windows 2000
Thanks,
John
John Sorkin M.D., Ph.D.
Chief, Biostatistics and
John Sorkin wrote:
I would like to get R2 (and and adjusted R2) from an lm. I know I can
compute R2 (SSreg/SStotal), but it would be nice to know if I could get
if automatically, e.g.
fit1-lm(y~x)
Rsq-fit1$rSquare.
R2.1.0 Patched under Windows 2000
summary(fit1)$r.squared
Jim,
I had some of the same difficulties. The NIR data frame consists of a
column of y variables and a matrix of X variables (and until looking at
this dataset, I had not realized that data frames could hold matrices).
So, after consulting the R-help sages, I turned by data into an
identical
hi,everyone,I am beginner for R. I want to use R for simulating
population genetic structrue of different generations. This thesis
include alleles of 1-10 loci. Does a package like this exist?
thanks for you.
__
G
Hi
joerg van den hoff wrote:
for some reason the following message seems not to have reached the list
in the first try, at least I can't find it. my apologies if this is my
fault:
we are running R under Solaris with SunRay Terminals, which are set to 8
bit color to comply with some other
I think I am doing something wrong when I try to bootstrap R square
obtained from lm. My code is included below. No matter how many times I
run the simulation, I always get exactly the same result, the bias and
std.error are always zero. I would think that these values should be
non-zero. I would
Your function does not meet the requirement for boot(). Here's an example:
x - runif(100)
y - x + rnorm(100, sd=0.1)
dat - data.frame(x, y)
rm(x,y)
rsq - function(data, idx) summary(lm(y~x, data=dat[idx,]))$r.squared
rsq.boot - boot(dat, rsq, R=200)
rsq.boot
ORDINARY NONPARAMETRIC
download this package gap - genetic analysis package.
E
On 6/2/05, luan_sheng [EMAIL PROTECTED] wrote:
hi,everyone,I am beginner for R. I want to use R for simulating
population genetic structrue of different generations. This thesis
include alleles of 1-10 loci. Does a package like this
88 matches
Mail list logo