Hello,
I have a question about function arima.sim
I tried to somulate a AR(1) process, with no innovation, no error term.
I used this code:
library(forecast)
e=rnorm(100,mean=0,sd=0)
series=arima.sim(model=list(ar=0.75),n=100,innov=e)+20
Then I tried to applicate ti this series auto.arima functi
Gábor Csárdi wrote:
Dear All,
I have the following in a .Rd file:
...
human readable (not binary) format. The format itself is like
the following:
\preformatted{
\# vertex1name
vertex2name [optionalWeight]
vertex3name [optionalWeight]
}
Here,
Lina, check whether something like
data.frame(density(rnorm(10))[1:2])
contains the information you want. Otherwise, try to be (much) more specific in
what you want so that we do not need to guess (and of course provide minimal,
self-contained, reproducible code). That has a higher chance to t
Dear Steve,
I don't think that ggplot2 has that option. Hadley, please correct me if
I'm wrong.
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel
Hi,
Try opening and closing the device outside the loop,
pdf("D:/research/plot.pdf")
for (i in 1:n) {
plot(mon, mu, type ='o')
}
dev.off()
HTH,
baptiste
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do re
Hello,
Â
Could someone help me please and to tell how to get the probability from
empirical DENSITY (not parametric) for each data value (R function).
For example, for normal distribution there is such a function like:
Â
âdnorm(q, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE)â
Â
Hi all,
I ran in to a problem while trying to install RMAGEML package.
/usr/bin/ld: cannot find -ljava . (please look at the bottom for
details of the error)
I have set the following in ~/.bashrc file.
export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64
export
LD_LIBRARY_PATH=/ho
i am having a problem in saving plots in pdf. i have this code below and it
only shows me the last plot. i tried keeping my devices open by removing
dev.off() from the code but the pdf file won't open
for (i in 1:n) {
.
.
.
pdf("D:/research/plot.pdf")
plot(mon, mu, type ='o')
dev.off()
}
my for
Hi guys,
I still did not solve my problem properly! I have to compare the values of two
lists of 250 numbers as a result of using the ?by function!
List1 of 250
$ 0 : num [1:28] 22 11 31...
$ 1 : num [1:15] 12 14 9 ...
..
..
..
- attr(*, "dim")= int 250
- attr(*, "dimnames")=List of 1
L
On Tue, Sep 29, 2009 at 6:58 AM, wrote:
> Apologies for the misunderstanding. I can come up with a solution that might
> suit your needs:
>
> library(plyr)
> out <- ddply(test, .(nr), function(x) data.frame(date=x$date,
> index=rank(-as.integer(x$date
> out[is.na(out$nr) | is.na(out$date),
Dear List,
I just googled to find out if notched box plots are possible with
ggplot2, but couldn't find a answer to it.
boxplot() has the option: notch = TRUE, e.g.: boxplot(mpg$hwy, notch=TRUE)
My example code (taken from the net) is:
require(ggplot2)
qplot(class, hwy, fill=factor(year), data
On Sep 29, 2009, at 8:39 AM, Dirk Eddelbuettel wrote:
On Tue, Sep 29, 2009 at 05:27:54AM -0700, Stefo Ratino wrote:
Hello,
I have written a C++ code and I would like to use it in R! Is this
possible?
Yes, see e.g. http://cran.r-project.org/package=Rcpp
And section 5 of the "Writing R Ex
Try this:
Str <- ":[Anna 'moi =) akku loppu joskus 4ltä. Kestää kauan
nää..'\tAmer, Tuusula (0:20)\t20\t12\t16\t00\t00\t11]/Anne 'Ei
jakoa,uus päivä muistio et 4n niin peruin. Hups'\t
(0:16)\t0\t12\t18\t00\t00\t11/Elina 'Konsertissa. En tod. vastaa
teille'\tEtu-Töölö, Helsinki (2:40)\t24\t12\t18\t
Thanks for the responses
@Patrik Burns
I'm going to try running on a 64 bit machine. Unfortunately R isn't
installed properly on it yet and our admin guy is away, so it'll have to
wait.
@ Uwe Ligges
Unless the program suddenly starts generating masses and masses of data, I
don't think this is t
An interesting, and topical, example of multivariate data for
classroom illustrations are the American college football rankings.
Starting at the end of October (or "week 8", the 8th week of the
football season) a set of rankings called the BCS (Bowl Championship
Series) will be published. This is
Hi, R-users,
I met a problem:
Items:[Anna 'moi =) akku loppu joskus 4ltä. Kestää kauan nää..'\tAmer, Tuusula
(0:20)\t20\t12\t16\t00\t00\t11]/Anne 'Ei jakoa,uus päivä muistio et 4n niin
peruin. Hups'\t (0:16)\t0\t12\t18\t00\t00\t11/Elina 'Konsertissa. En tod.
vastaa teille'\tEtu-Töölö, Helsink
Thanks to all of you who replied. You've provided some great leads. I
really appreciate it.
Gary
On Mon, Sep 28, 2009 at 10:01 AM, Gary Lewis wrote:
> Hi - Many organizations now make their data available as XML via a
> REST web service architecture. Is there any R package or facility to
> acce
On Tue, Sep 29, 2009 at 05:27:54AM -0700, Stefo Ratino wrote:
> Hello,
>
> I have written a C++ code and I would like to use it in R! Is this possible?
Yes, see e.g. http://cran.r-project.org/package=Rcpp
Dirk
--
Three out of two people have difficulties with fractions.
__
The function ecdf(x) computes the empirical cdf from data in the vector x.
You can plot it with plot(ecdf(x)), or compute the emp. cdf at new values,
e.g.
my.cdf <- ecdf(x)
my.cdf( 0:3 ) # computes the emp. cdf at 0,1,2,3
John
.
Hello,
I have written a C++ code and I would like to use it in R! Is this possible?
Many thanks in advance,
Stepho
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
Add a dummy argument to the function:
>> randomSamples<-lapply(1:2000,function(dummy){
> + meta_comp[sample(nrow(meta_comp),nTimes),]})
On Mon, Sep 28, 2009 at 9:39 PM, ewaters wrote:
>
> Thanks for your help.
>
> Unfortunately when I try it this generates an error as follows:
>
>> randomSamples
Apologies for the misunderstanding. I can come up with a solution that might
suit your needs:
library(plyr)
out <- ddply(test, .(nr), function(x) data.frame(date=x$date,
index=rank(-as.integer(x$date
out[is.na(out$nr) | is.na(out$date), "index"] <- NA
Xavier
- Mail Original -
De: "
Uwe, thanks, but this does not help, I still get:
LaTeX errors when creating PDF version.
This typically indicates Rd problems.
LaTeX errors found:
! You can't use `macro parameter character #' in vertical mode.
...ike the following: \begin {alltt} ##
Hi Xavier,
thank you for your suggestion, it's not exactly what I need. However I
made some progress using tapply, but it does not give me the 'correct'
result (see index - that's what I want to obtain!) when NAs are involved:
test <- data.frame(date =
as.Date(c('2007-01-01','2008-03-24','NA'
From Writing R Extensions:
"‘#’, ‘_’ and ‘&’ must not be escaped."
Uwe Ligges
Gábor Csárdi wrote:
Dear All,
I have the following in a .Rd file:
...
human readable (not binary) format. The format itself is like
the following:
\preformatted{
\# vertex1name
davew wrote:
Hi all,
I'm running an analysis with the random forest tool. It's being applied to a
data matrix of ~60,000 rows and between about 40 and 200 columns. I get the
same error with all of the data files (Cannot allocate vector of size
428.5MB).
I found dozens of threads regardi
2) See packages Epi and epitools
-Johannes
2009/9/29 Dmitry Gospodaryov :
> I have two types of survival data for Drosophila
> cohort. For example:
>
> uncensored
>
>> age <- c (0, 2, 4, 6, 8, 10)
>> alive1 <- c(10, 9, 6, 3, 1, 0)
>> alive 2 <- c(10, 9, 4, 1, 1, 0)
>
> and censored
>
>> age <- c(
On 9/29/2009 6:06 AM, abdul kudus wrote:
> Dear all,
>
> Given mypi
> mypi <- c(0.1,0.2,0.2,0.1,0.3,0.4,0.4,0.4,0.4,0.2)
>
> I want to create myfreq as follows
>
> mypi myfreq
> 0.1 2
> 0.2 3
> 0.2 3
> 0.1 2
> 0.3 1
> 0.4 4
> 0.4 4
> 0.4 4
> 0.4 4
> 0.2 3
>
> where myfreq is frequency of its co
Hi,
How would you compare several (simple) regression lines in R? Have you
heard of any implementation of the Johnson-Neyman procedure or
anything of this sort? Any suggestions?
Best,
Marcin
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mai
Hello,
Â
Could someone help me please and to tell how to get the probability from
empirical distribution (not parametric) for each data value (R function).
For example, for normal distribution there is such a function like:
Â
âpnorm(q, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE)â
Â
Dear all,
Given mypi
mypi <- c(0.1,0.2,0.2,0.1,0.3,0.4,0.4,0.4,0.4,0.2)
I want to create myfreq as follows
mypi myfreq
0.1 2
0.2 3
0.2 3
0.1 2
0.3 1
0.4 4
0.4 4
0.4 4
0.4 4
0.2 3
where myfreq is frequency of its corresponding observation. How to do that?
Thank you,
Regards,
A. Kudus
Institu
Is this what you want?
test[order(test$nr, -as.integer(test$date)),]
Xavier
- Mail Original -
De: "Stefan Uhmann"
À: r-help@r-project.org
Envoyé: Mardi 29 Septembre 2009 11h27:20 GMT +01:00 Amsterdam / Berlin / Berne
/ Rome / Stockholm / Vienne
Objet: [R] sort dates within a factor
De
Dear All,
I have the following in a .Rd file:
...
human readable (not binary) format. The format itself is like
the following:
\preformatted{
\# vertex1name
vertex2name [optionalWeight]
vertex3name [optionalWeight]
}
Here, the first vertex of a
Hi all,
I'm running an analysis with the random forest tool. It's being applied to a
data matrix of ~60,000 rows and between about 40 and 200 columns. I get the
same error with all of the data files (Cannot allocate vector of size
428.5MB).
I found dozens of threads regarding this problem, but
Hi List,
I'm trying to perform some spectral analysis on a time series, but I've
got a few data points missing, so they have NA values. Unfortunately,
the fft function doesn't seem to like this, and gives a completely empty
result.
Other than making up values to fill in the gaps, is there any way
Hey guys,
im sort of a beginner with R, but here's what i need to do.
i need to perform a time series analysis on a set of financial data that i've
been given. im trying to look at the ACF and PACF and fit it to a particular
model (i think its the ARIMA model because i've read that financial d
Dear List,
I have the following data:
>>
test <- data.frame(date =
as.Date(c('2007-01-01','2008-03-24','2003-03-02','2008-05-03','2002-05-23','2001-06-30','2005-12-04')),
nr = c(2000,2000,2000,2001,2002,2003,2003))
test
date nr
1 2007-01-01 2000
2 2008-03-24 2000
3 2003-03-02
Nair, Murlidharan T wrote:
-Original Message-
From: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de]
Sent: Sunday, September 27, 2009 1:17 PM
To: Nair, Murlidharan T
Cc: r-help@r-project.org
Subject: Re: [R] error while plotting
Nair, Murlidharan T wrote:
I am getting the foll
Or with plyr there's a more flexible approach:
res.aov <- dlply(warpbreaks, .(tension), function(x) aov(breaks ~ wool, data=x))
# aov results are stored in a list, you can directly extract what you want with
l*ply
l_ply(res.aov, function(x) print(summary(x)))
ldply(res.aov, function(x) data.fram
On 09/29/2009 01:29 PM, Chunhao Tu wrote:
Hi R users,
I try to build a function to compute odds ratio and relative risk however
something wrong. I stuck for many hours but I really don't know how to solve
it. Would someone please give me a hint?
OR.RR<-function(x){
+ x<- as.mat
Ping-Hsun Hsieh wrote:
Hi,
I am trying to plot my dataset, consisting of one column with numeric values
and one column with group IDs.
The set is similar to the following df.
df <- NULL
for ( i in 1:20)
{
tmp1 <- runif(1000,0,5)
tmp2 <- cbind(tmp1,i)
df <- rbind(df,tmp2)
}
Now I woul
I have two types of survival data for Drosophila
cohort. For example:
uncensored
age <- c (0, 2, 4, 6, 8, 10)
alive1 <- c(10, 9, 6, 3, 1, 0)
alive 2 <- c(10, 9, 4, 1, 1, 0)
and censored
age <- c(0, 2, 4, 6, 8, 10)
alive1 <- c(10, 8, 3, 1, 1, 0)
escaped1 <- c(0, 1, 1, 0, 0, 0)
alive2 <- c(10
Did you run debug over your function?
Load the library debug, and then run mtrace over your function.
library(debug)
? mtrace
hth
On Tuesday 29 September 2009 04:29:37 Chunhao Tu wrote:
> Hi R users,
> I try to build a function to compute odds ratio and relative risk however
> something wrong.
Chunhao Tu wrote:
Hi R users,
I try to build a function to compute odds ratio and relative risk however
something wrong. I stuck for many hours but I really don't know how to solve
it. Would someone please give me a hint?
OR.RR<-function(x){
+ x <- as.matrix(any(dim(x)==2))
+
On Tue, Sep 29, 2009 at 4:29 AM, Chunhao Tu wrote:
>
> Hi R users,
> I try to build a function to compute odds ratio and relative risk however
> something wrong. I stuck for many hours but I really don't know how to solve
> it. Would someone please give me a hint?
>
>> OR.RR<-function(x){
What i
Hi R users,
I try to build a function to compute odds ratio and relative risk however
something wrong. I stuck for many hours but I really don't know how to solve
it. Would someone please give me a hint?
> OR.RR<-function(x){
+ x <- as.matrix(any(dim(x)==2))
+ OR<-(x[1,1]*x[2,2])/(x[1
Hi,
if you like to use sql you can use the sqldf package.
Another possibility is the basic function merge.
HTH Christian
> Hi,
>
> how can I do a data step in R which can be best described in SQL terminology
> as an outer join of rows (eg cases) and inner join of columns (variables)? In
>
Thanks for your help.
Unfortunately when I try it this generates an error as follows:
> randomSamples<-lapply(1:2000,function(){
+ meta_comp[sample(nrow(meta_comp),nTimes),]})
Error in FUN(1:2000[[1L]], ...) : unused argument(s) (1:2000[[1]])
jholtman wrote:
>
> nTime <- 15 # how many samp
einsundeins gmail.com> writes:
>
>
> Hello everyone,
>
> this is my first post here and I hope I signed up correctly and someone will
> take me by the hand and help me out. I am new to R and cannot figure out
> what to do here...
>
> ... I want to have an User Interface that requests input. I
Hi,
how can I do a data step in R which can be best described in SQL terminology as
an outer join of rows (eg cases) and inner join of columns (variables)? In case
of conflicting non-missing values the first dataset has higher always priority.
Missing values should always be replaced by valid v
101 - 150 of 150 matches
Mail list logo