On Sat, 10-Mar-2012 at 02:21PM -0600, harold kincaid wrote:
|> I am getting "too many open devices" after 60 graphs. The archived
|> comments on this problem were too sketchy to be helpful. Any ideas?
With minimal information, my guess might not be correct, but I suspect
you're plotting to a Wind
On 11-03-2012, at 01:01, casperyc wrote:
> Sorry if I wasn't stating what I really wanted or it was a bit confusing.
>
> Basically, there are MANY datasets to run suing the same function
>
> I have written a function to analyze it and returns a LIST of useful out put
> in the variable 'res' (to
Thanks for the example.
Have you tried fitting a principal curve via either the princurve or
pcurve packages? I think this might work for what you want, but no
guarantees.
Note that loess, splines, etc. are all fitting y|x, that is, a
nonparametric regression of y on x. That is not what you say
Sorry if I wasn't stating what I really wanted or it was a bit confusing.
Basically, there are MANY datasets to run suing the same function
I have written a function to analyze it and returns a LIST of useful out put
in the variable 'res' (to the workspace).
I also created another script run.r s
Hi,
I'm wondering which function would allow fitting this type of data:
tmp=rnorm(2000)
X.1 = 5+tmp
Y.1 = 5+ (5*tmp+rnorm(2000))
tmp=rnorm(100)
X.2 = 9+tmp
Y.2 = 40+ (1.5*tmp+rnorm(100))
X.3 = 7+ 0.5*runif(500)
Y.3 = 15+20*runif(500)
X = c(X.1,X.2,X.3)
Y =
In general, I *think* this is a hard problem (it sounds knapsack-ish)
but since you are on small enough data sets, that's probably not so
important: if I understand you right, this little function will help
you.
plusminus <- function(n){
t(as.matrix(do.call(expand.grid, rep(list(c(-1,1)), n)))
Your immediate problem seems to be that you use "sum" as a variable
name when it is also a function name. You also have scoping issues
that result from how you're using with() -- if you don't return an
object, it gets thrown away after the with() function is done (part of
the functional paradigm) -
That's not useful sample data -- like I said, dput() some sample data
and send it. I can try to figure out how to plot what you're asking,
but there is literally no data in what you sent.
Not copy and paste the output of a print command -- dput(). (You'll
understand why when you see it)
And like
Ok so this seems to work :)
tmp=rnorm(2000)
X.background = 5+tmp
Y.background = 5+ (10*tmp+rnorm(2000))
X.specific = 3.5+3*runif(3000)
Y.specific = 5+120*runif(3000)
X = c(X.background, X.specific)
Y = c(Y.background, Y.specific)
MINx=range(X)[1]
MAXx=range(X
Hi,
Thanks a lot for your reply - I posted a second message where I
provide a "dummy" example, entitled
"How to improve the robustness of "loess"? - example included".
I need to fit a curve which makes it a bit difficult to work with kde2d only.
I'm actually trying to use kde2d in combination wi
On Mar 10, 2012, at 3:55 PM, Emmanuel Levy wrote:
Hi,
I'm trying to normalize data by fitting a line through the highest
density
of points (in a 2D plot).
In other words, if you visualize the data as a density plot, the fit
I'm
trying to achieve is the line that goes through the "crest" o
Joshua Wiley gmail.com> writes:
>
>
>
Thanks Joshua!
Best regards,
--Sergio.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provid
Hi Michael: abnormal returns in a term used in finance to describe the
"residual return"
after estimating a return model ( either capm or apt or whatever ) so the
needs
to build a return model ( capm is the easiest ) and then just calculate the
residuals.
these are termed the residual returns and c
Your code for iy doesn't work as providedI'll assume you meant this instead:
iy <- list(c(1, 2),c(1, 2), c(1, 2, 3, 4), c(2, 3, 5), c(4), c(5, 6,
7), c(7, 8, 9))
Then
sapply(iy, function(x) sum(Y1[x]))
Michael
On Sat, Mar 10, 2012 at 5:01 PM, aldi wrote:
> Hi,
>
> I have a vector
> Y1 <-c
Well, it's not hard to write the code for it, but if you know the
secret way to accurately model "abnormal returns," you'll be a far
richer man than I quite soon.
Less snidely, one needs to say quite a bit more about a distribution
to specify it than "not Gaussian."
Michael
On Sat, Mar 10, 2012
? try or ? tryCatch
Michael
On Sat, Mar 10, 2012 at 6:08 PM, Alaios wrote:
> Dear all,
> I would like to ask you how I can catch an error on R and then ask it to
> resume.
>
> For example I have a large for loop and I know for a small number inside that
> loop there will be errors. How I can a
Hi Julio,
If you look at the documentation for
?read.fwf
you will see '...' further arguments to be passed to 'read.table'
and if you look at
?read.table
you will see there is an argument called, 'encoding', so, yes. Just
specify the encoding.
Cheers,
Josh
On Sat, Mar 10, 2012 at 3:41 PM
I'm trying to read a data file that contains characters from the Spanish
language:
> Station <- read.fwf("LosDatos.txt",widths=c(7,7,25,8,8,5),header=FALSE,
+ skip=3,n=separ[1]-4)
Then the R interpreter issues the following message:
Error en substring(x, first, last) :
Hi,
I posted a message earlier entitled "How to fit a line through the
"Mountain crest" ..."
I figured loess is probably the best way, but it seems that the
problem is the robustness of the fit. Below I paste an example to
illustrate the problem:
tmp=rnorm(2000)
X.background = 5+tmp; Y.b
Hi Erin,
You need to make sure that rJava both installs correctly and can load.
The R package system is quite robust, so off the top of my head, I
would guess you need to setup Java properly on the machine. See the
rJava package for what it requires.
Cheers,
Josh
On Sat, Mar 10, 2012 at 3:19
Hello!
I'm using R-2.14.2 on a Windows 7 64 bit machine and I did the following:
> install.packages("rJava",depen=TRUE)
--- Please select a CRAN mirror for use in this session ---
trying URL
'http://cran.sixsigmaonline.org/bin/windows/contrib/2.14/rJava_0.9-3.zip'
Content type 'application/zip
Dear all,
I would like to ask you how I can catch an error on R and then ask it to resume.
For example I have a large for loop and I know for a small number inside that
loop there will be errors. How I can ask in that case from R just to ignore it
and return back to the loop?
I would like to th
Inline
On Sat, Mar 10, 2012 at 1:47 PM, Balaitous wrote:
> Le samedi 10 mars 2012 à 12:25 -0700, ilai a écrit :
>> On Sat, Mar 10, 2012 at 9:33 AM, Balaitous wrote:
>
> Var1 and Var2 are 2 two different observed variables (with different scales)
You might want to consider scales=list(y=list(rel
On Sun, Mar 11, 2012 at 10:29 AM, casperyc wrote:
> Hi all
>
> Say I have a function:
>
> myname=function(dat,x=5,y=6){
> res<<-x+y-dat
> }
>
> for various input such as
>
> myname(dat1)
> myname(dat2)
> myname(dat3)
> myname(dat4)
> myname(dat5)
>
> how should I modify the 'res' line, to have
On Sat, Mar 10, 2012 at 01:29:16PM -0800, casperyc wrote:
> Hi all
>
> Say I have a function:
>
> myname=function(dat,x=5,y=6){
> res<<-x+y-dat
> }
>
> for various input such as
>
> myname(dat1)
> myname(dat2)
> myname(dat3)
> myname(dat4)
> myname(dat5)
>
> how should I modify the 'res' l
Hi,
I would be very grateful for advice on getting confidence
intervals for the ordinary (non smoothed) parameter
estimates from a gam.
Motivation
I am studying hospital outcomes in a large data set. The
outcomes of interest to me are all binary variables. The one
in the example here, Dead3
if (nonzero) mean(x[x>0]) else mean(x)
On Sat, Mar 10, 2012 at 2:47 PM, wrote:
> Using functions how would I go about do this question?
>
> (I already have a mean defined for a function of x.)
>
> Write a function called MyMean2. This function has two arguments, x and
> nonzero, where nonzero h
It would help if you showed us how you were plotting. are you calling
'dev.off()' after creating an output file? The "comments on this
problem were to sketchy to be helpful".
On Sat, Mar 10, 2012 at 3:21 PM, harold kincaid
wrote:
> I am getting "too many open devices" after 60 graphs. The archiv
Hi,
I have a vector
Y1 <-c(8, 11, 7, 5, 6, 3, 6, 3, 3)
and an index
iy <-c(c(1, 2),c(1 2), c(1, 2, 3, 4), c(2, 3, 5), c(4), c(5, 6, 7), c(7,
8, 9))
how can I produce the mean, or the sum of the elements specified in the
index iy from the vector Y1?
expecting something like this for th
Without taking away all the fun of trial and error, and exploration in R... I
will direct you to this website which I found invaluable when I first began
to use R.
one way would be to use:
plot(Yourdata, type="n")
and then 3 text() or points() statements to plot the groups represented by
differen
I am getting "too many open devices" after 60 graphs. The archived
comments on this problem were too sketchy to be helpful. Any ideas?
Thanks Harold
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the post
Hi, Michael,
Thank you for your help!
In its simplified form, the data frame looks like:
idx true_value meandiff_mean1 diff_mean2diff_mean3sdt
diff_std1diff_std2diff_std3 samplesize
1
Using functions how would I go about do this question?
(I already have a mean defined for a function of x.)
Write a function called MyMean2. This function has two arguments, x and
nonzero, where nonzero has the default value TRUE. This function should return
the
(Previous defined mean of x) i
Hi
This has a simple answer but it has been eluding me nonetheless.
I have been trying to build a PCA plot from scratch with the ability to plot
predefined groups in different colors. I can plot PCA but I want it to plot
with predefined groups(samples) with top 100 expressed genes. I have three
Hi all,
I am trying to implement a Monte-Carlo simulation for each cell in a
spatial matrix (using mcd2 package) .
I have figured out how to conduct the simulation using data from a single
location (where I manually input distribution parameters into the R code),
but am having trouble (a) adjus
Hi all
Say I have a function:
myname=function(dat,x=5,y=6){
res<<-x+y-dat
}
for various input such as
myname(dat1)
myname(dat2)
myname(dat3)
myname(dat4)
myname(dat5)
how should I modify the 'res' line, to have new informative variable name
correspondingly, such as
dat1.res
dat2.res
dat3.
Hello
This is my first post on this forum and I hope someone can help me out.
I have a datafile (weeklyR) with returns of +- 100 companies.
I acquired this computing the following code:
library("tseries");
tickers = c("GSPC" , "BP" , "TOT" ,"ENI.MI" , "VOW.BE" , "CS.PA" ,
"DAI.DE" ,
Hi,
I'm trying to normalize data by fitting a line through the highest density
of points (in a 2D plot).
In other words, if you visualize the data as a density plot, the fit I'm
trying to achieve is the line that goes through the "crest" of the mountain.
This is similar yet different to what LOES
On Sat, Mar 10, 2012 at 12:11 PM, Ben quant wrote:
> Very interesting. You are doing some stuff here that I have never seen.
and that I would not typically do or recommend (e.g., fussing with
storage mode or manually setting the dimensions of an object), but
that can be faster by sacrificing high
Very interesting. You are doing some stuff here that I have never seen.
Thank you. I will test it on my real data on Monday and let you know what I
find. That cmpfun function looks very useful!
Thanks,
Ben
On Sat, Mar 10, 2012 at 10:26 AM, Joshua Wiley wrote:
> Hi Ben,
>
> It seems likely that t
On Sat, Mar 10, 2012 at 9:33 AM, Balaitous wrote:
> Hi,
>
> I have a data.frame df with
> names(df) = c("Var1", "Var2", "Var3", "Var4")
>
> and I plot data with
>
> xyplot(Var1+Var2~Var3|Var4, data=df)
>
> I want to use different panel functions for Var1 and Var2.
> How can I do ?
You didn't spec
On 2012-03-10 08:35, sybil kennelly wrote:
Dear all.
I wanted to read in a 20,000 row X 60 column matrix (called "table") into R.
i did this:
R
table<- read.table("table", header=TRUE)
table
it prints out the start of my table (~1 rows by 7 columns) and then
this error:
[ reached g
I hope you all don't mind this question, but I need help interpreting output
for a linear mixed effects model output I've been trying to learn to do in R. I
am new to longitudinal data analysis and linear mixed effects regression. I
have a model I fitted with weeks as the time predictor, and sco
Thanks a lot!
Could you please elaborate on this one?
"What I'd really do, if you had lots of data, would be to bin x into
small contiguous bins and to calculate quantiles for each of those
bins and to plot smoothers across the quantiles (using bin medians as
the x axis) "
On Fri, Mar 9, 2012 at
Thanks Josh!
How do I make it 50% quantile in each bin instead of the mean?
Thanks a lot!
On Fri, Mar 9, 2012 at 9:11 PM, Joshua Wiley wrote:
> Hmm, smooth the chart makes me think you are trying to find the trends:
>
>
> require(ggplot2)
> ggplot(mtcars, aes(mpg, hp)) +
> geom_point() +
> s
Hi Ben,
It seems likely that there are bigger bottle necks in your overall
program/use---have you tried Rprof() to find where things really get
slowed down? In any case, f2() below takes about 70% of the time as
your function in your test data, and 55-65% of the time for a bigger
example I constr
What does your data look likedput() is your friend.
Also, it'd be helpful if you could give base graphics code for
more-or-less what you are looking for (since you can do so already) as
it's pretty hard to describe graphics without pictures.
Running example(xyplot) might help you get started
Dear All,
I would like to ask a question on how to do overlay plots in each subgraph of
xyplot.
1. I did simulations for m=1000, 2500, 5000, 1, as the sample sizes.
2. for each sample size value m, 4 graphs are generated; each graph contains
overlayed comparisons between 4 methods,
3. now
Hey i have a similar size dataset and ran into the same problem, but i
found this command works fine:
options(max.print=100)
to fix it?
On Sat, Mar 10, 2012 at 4:35 PM, sybil kennelly wrote:
> Dear all.
>
> I wanted to read in a 20,000 row X 60 column matrix (called "table") into
> R.
>
>
Hi,
I have a data.frame df with
names(df) = c("Var1", "Var2", "Var3", "Var4")
and I plot data with
xyplot(Var1+Var2~Var3|Var4, data=df)
I want to use different panel functions for Var1 and Var2.
How can I do ?
Something like :
panel.mypanel = function(x, y, ...) {
if (Var1) panel.Var1Panel(
Dear all.
I wanted to read in a 20,000 row X 60 column matrix (called "table") into R.
i did this:
>R
>table <- read.table("table", header=TRUE)
>table
it prints out the start of my table (~1 rows by 7 columns) and then
this error:
[ reached getOption("max.print") -- omitted 5465 rows ]]
Read ?paste and use something like
paste("GPS_", paste("TimeStamps", collapse = "_"), sep = "")
Michael
On Sat, Mar 10, 2012 at 11:41 AM, Alaios wrote:
> Dear all,
> I am using paste to create a file name.
> filename<- paste("GPS_", TimeStamps, sep="")
> where TimeStamps is a character vector,
Dear all,
I am using paste to create a file name.
filename<- paste("GPS_", TimeStamps, sep="")
where TimeStamps is a character vector, of two elements.
The problem is that the paste instead of one string will make two, one for each
entry of the TimeStamps vector. Would it be possible to make the
Thanks for the info. Unfortunately its a little bit slower after one apples
to apples test using my big data. Mine: 0.28 seconds. Yours. 0.73 seconds.
Not a big deal, but significant when I have to do this 300 to 500 times.
regards,
ben
On Fri, Mar 9, 2012 at 1:23 PM, Rui Barradas wrote:
> Hel
Hello Ruth:
> Many thanks for this detailed explanation. It seems that the printing is
> going to vary because it is not done by R. I will try alternative
> numbers of significant digits: I had set options(digits=4) in an attempt
> to avoid inter-platform printing differences, without really
>
Duncan,
Thanks for your reply: given Petr's response, it seems the problem is
the interpretation by the printing code, not the actual representation
of the number. Given the representation, 1.817 would be correct, unless
at the working accuracy it is considered to be equal to 1.8165 (as
indee
Petr,
Many thanks for this detailed explanation. It seems that the printing is
going to vary because it is not done by R. I will try alternative
numbers of significant digits: I had set options(digits=4) in an attempt
to avoid inter-platform printing differences, without really
understanding
Thanks a lot works great :)
Alex
From: Berend Hasselman
Cc: R help
Sent: Saturday, March 10, 2012 11:19 AM
Subject: Re: [R] Treat Variable as String and a String as variables name
On 10-03-2012, at 10:39, Alaios wrote:
> Dear all.
> I am having ten varia
My first reply to this went privately, by accident. I've done a little
editing to it, but mainly this is for the archives.
On 12-03-09 2:36 PM, Michael Friendly wrote:
For a paper dealing with generalized ellipsoids, I want to illustrate in
3D an ellipsoid that is unbounded
in one dimension, h
On Mar 10, 2012, at 7:44 AM, Alaios wrote:
Dear all,
I have a large vector (lets call it myVector) and I want to plot its
value with the logic below
yaxis<-myVector[1]
yaxis<-c(xaxis,mean(myvector[2:3])
yaxis<-c(xaxis,mean(myvector[4:8])
yaxisthis has to stop when the new .
yaxiscorre
Dear Nicole,
Sorry, I didn't notice the earlier messages in this thread.
Please see below.
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of Nicole Marie Ford
> Sent: March-10-12 1:20 AM
> To: r-help
> Subject: Re: [R] problem
Dear all,
I have a large vector (lets call it myVector) and I want to plot its value with
the logic below
yaxis<-myVector[1]
yaxis<-c(xaxis,mean(myvector[2:3])
yaxis<-c(xaxis,mean(myvector[4:8])
yaxishttps://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-projec
On 10-03-2012, at 12:49, Hans Ekbrand wrote:
> On Fri, Mar 09, 2012 at 04:52:31PM -0800, A Ezhil wrote:
>> Dear All,
>>
>> I am trying to install rgl on my mac notebook from the source file. I tried
>> using: /usr/bin/R64 CMD INSTALL rgl_0.92.798.tar.gz and get the following
>> error message:
>
On Fri, Mar 09, 2012 at 04:52:31PM -0800, A Ezhil wrote:
> Dear All,
>
> I am trying to install rgl on my mac notebook from the source file. I tried
> using: /usr/bin/R64 CMD INSTALL rgl_0.92.798.tar.gz and get the following
> error message:
>
> checking for X... no
> configure: error: X11 not f
Thank you for the replies.
So what my test wants to do is this:
I have a big matrix, 30 rows (students in a class) X 50 columns (students
grades for the year).
An example of the matrix is as such:
grade1 grade2grade3 . grade 50
student 1
student 2***
st
On 10-03-2012, at 10:39, Alaios wrote:
> Dear all.
> I am having ten variables (let's call the four of them as
>
> Alpha, Beta, Gamma and Delta.)
>
> For each variable I have to print around 100 (plots). E
>
> So far I was copying paste the code below many times.
>
> pdf(file="DC_Alpha_
On Mar 10, 2012, at 09:57 , Prof Brian Ripley wrote:
> Please ask about OS X on R-sig-mac .
Yep. (Or R-devel for generic developer issues, but this one is pretty OSX
specific.)
> There is something you have not installed on your OS, but it will probably
> need several rounds to find what (and
Dear all.
I am having ten variables (let's call the four of them as
Alpha, Beta, Gamma and Delta.)
For each variable I have to print around 100 (plots). E
So far I was copying paste the code below many times.
pdf(file="DC_Alpha_All.pdf", width=15) # First Variable is treated as string
p
On Fri, Mar 09, 2012 at 09:34:14PM +, Ruth Ripley wrote:
> Dear all,
>
> I have been running some tests of my package RSiena on different
> platforms and trying to reconcile the results.
>
> With Mac, the commands
>
> options(digits=4)
> round(1.81652, digits=4)
>
> print 1.817
>
> With W
Please ask about OS X on R-sig-mac .
There is something you have not installed on your OS, but it will
probably need several rounds to find what (and it will be not just
Mac-specific but depend on the exact versions of OS X (which you told
us) and Xcode (which you did not)).
On Fri, 9 Mar 20
On Fri, Mar 09, 2012 at 08:26:01PM -0500, Massimo Di Stefano wrote:
> my target is to have 'groups of species' based on the similarity of theyr
> environmental parameters, and build a dendrogram like [2]
>
> [2] http://massimo-timecapsule.whoi.edu//data/img/manova_clust_matlab.png
> Il giorno M
71 matches
Mail list logo