?forecast
Maybe ?xts or ?timeSeries if you need to adjust dates, etc.
On 3/11/10, chinna wrote:
>
> sample report data that i want to forecast
>
> quarter quarter_index Revenue
> 2007 Q1 1 $3,856,799
> 2007 Q2 2 $4,243,328
> 2007 Q3 3
Thanks
You are second who responded. In my previous mail I suggested slight
modification for cut.POSIXt help page to help those who do not use this
too often to avoid this trap.
Regards
Petr
Brian Diggs napsal dne 10.03.2010 20:47:49:
> On 3/10/2010 1:01 AM, Petr PIKAL wrote:
> > Dear all
>
have a look at function rmvlogis() from package ltm, e.g.,
library(ltm)
p <- 5
n <- 10
a <- rnorm(p, 0.8, 0.04)
b <- rnorm(p, 0, 1)
?rmvlogis
rmvlogis(n, cbind(b, a))
I hope it helps.
Best,
Dimitris
On 3/11/2010 5:03 AM, Helena wrote:
hello R:
we have a two-parameter IRT simulation code.
Thank you very much Miguel ! I couldn't believe it was that easy.
Luis Vega.
--- On Wed, 3/10/10, Miguel Porto wrote:
From: Miguel Porto
Subject: Re: [R] Joining elements of an array into a single element
To: veg...@yahoo.com
Cc: r-help@r-project.org
Date: Wednesday, March 10, 2010, 8:57 PM
H
i am trying to duplicate R's computation of standard errors but having some
trouble. i loaded some data into R and ran summary(lm(y~x1+x2+x3+0,
data=data)), but i am not sure how the "Std. Error" values are computed.
let y be the nx1 vector of dependent variables and X be the nx3 matrix of
indep
hello R:
we have a two-parameter IRT simulation code. The goal is to generate a
response matrix.But the "for" part doesn't run. we don't know what is wrong
with it.
Thanks so much~~~
I <- 10
J <- 5
response <- matrix(0, 10, 5)
pij <- function(a,b,theta)
{
a <- rnorm(J, 0.8, 0.04)
a
b <- rnorm(J
Hi
Thanks for clarification. Actually I knew that with first case I get some
data with NAs at the beginning and at the end. Maybe my English is not
good enough to understand that to get vector of dates split to several
chunks I need to put also end date and last date to get the whole vector.
T
Hi
r-help-boun...@r-project.org napsal dne 10.03.2010 15:37:00:
>
> Hi Petr,
>
> Thanks again for your post the problem is now solved - thank you so much
for
> trying and trying to get this to work.
>
> So the final script that actually worked was:
>
> ##ALL SUBSET DATA
>
> #Create vector t
Shaoqiong Zhao wrote:
>
> I have two matrix s1 and s2, each of them is 1000*1.
> and I have two equations:
> digamma(p)-digamma(p+q)=s1,
> digamma(q)-digamma(p+q)=s2,
> and I want to sovle these two equations to get the value of x and y, which
> are also two 1000*1 matrices.
>
Besides BB there
sample report data that i want to forecast
quarter quarter_index Revenue
2007 Q1 1 $3,856,799
2007 Q2 2 $4,243,328
2007 Q3 3 $4,930,369
2007 Q4 4 $5,443,579
2008 Q1
I am interested in Rdsm package, but I have no idea about how to use it.
Where can I find examples?
regards
Guo-Hao Huang
--
From: "Norm Matloff"
Sent: T
My long-promised Rdsm package is now on CRAN. Some of you may recall
that I made a prototype available on my own Web page last July. This is
the official version, much evolved since I released the prototype.
The CRAN description states:
Provides a threads-like programming environment for
The example works fine for me. I am using the same version of R (2.9.2) from
the Ubuntu 9.10 AMD-64 repositories and plm version 1.2-3 downloaded from
CRAN.
One point. The plm help example loads the "Produc" dataset from the package
"plm" and not the package "Ecdat". Though I can get the example t
Thanks Felix and David. [Actually, don't go by variable name us.map, I was
using an example I found online...]
On Tue, Mar 9, 2010 at 11:43 PM, David Winsemius wrote:
>
> On Mar 9, 2010, at 10:42 PM, Gurmeet wrote:
>
> Hi All,
>>
>> I'm trying to add a map on the following lattice plot, but not
>
On Mar 10, 2010, at 9:49 PM, Nai-Wei Chen wrote:
Dear all,
Is there any package about multivariate nonparametric local
polynomial in R? Thank you so much.
locfit
--
David.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/list
Hello,
I'm working on an structural VAR using the var command to estimate and the
svar command on the resultant object (package: vars). I want to constrain
coefficients to equal one another, but that value to be estimated. So for
the A matrix, I want A[2,1]=A[1,2] to be my constraints.
Can this b
Hi,
I am clustering data based on three numeric variables. I have a fourth
variable that is categorical (site) which I would like to use to label the
leaves of my dendrogram, so I can see how the different sites are grouped
throughout the tree, but I do NOT want to use this variable in the clust
Here is how you can solve:
fn <- function(x, s){
f <- rep(NA, length(x))
f[1] <- digamma(x[1]) - digamma(x[1]+x[2]) - s[1]
f[2] <- digamma(x[2]) - digamma(x[1]+x[2]) - s[2]
f
}
require(BB) # load this package for the nonlinear solver
s <- c(-2, -4) # one row of s1 and s2
ans <- dfsane(par=c(1,
Dear all,
Is there any package about multivariate nonparametric local polynomial in R?
Thank you so much.
Sincerely,
Joe
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinf
I have two matrix s1 and s2, each of them is 1000*1.
and I have two equations:
digamma(p)-digamma(p+q)=s1,
digamma(q)-digamma(p+q)=s2,
and I want to sovle these two equations to get the value of x and y, which are
also two 1000*1 matrices.
I write a program like this:
f <- function(x) {
p<- x[1]
You can try this also:
as.data.frame(lapply(subset(data, X == 'a'), '[', drop = TRUE))
On Wed, Mar 10, 2010 at 6:35 PM, clee wrote:
>
> If anyone can help with this, I would greatly appreciate it.
>
> When I subset a dataframe, and then create a table of on of the column
> variables, the levels
On Wed, Mar 10, 2010 at 7:50 PM, Thomas Lumley wrote:
> On Wed, 10 Mar 2010, baptiste auguie wrote:
>
>> Hi,
>>
>> it's generally considered a bad practice but try this,
>>
>> eval(parse(text=AA))
>>
>> library(fortunes)
>> fortune(106)
>>
>> HTH,
>>
>> baptiste
>>
>> On 10 March 2010 07:46, jq81
One other option is to use the mixedsort() function, which is in the gtools
package on CRAN:
library(gtools)
x <- c(4, 5, 6, 8, 9, 11, "Y", 1, 13, 15, 16, 20,
"X", 2, 3, 10, 14, 19, "XY", 7, 12, 18,
17, 22, 21)
> mixedsort(x)
[1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10
Soyeon -
It sounds like you want a combination of a numerical
sort and a lexigraphical sort. I think they need to
be done separately, and then joined back together:
myvec = scan(,what='')
1: 4 5 6 8 9 11 Y 1 13 15 16 20 X 2 3 10 14 19 XY 7 12 18 17 22 21
26:
Read 25 items
myv
ManInMoon wrote:
I have writtn a function where I pass a variable number of arguments.
I They are vectors and I can manipulate them, but I need to get hold of the
name for a legend.
niceplot<-function(...) {
parms=list(...)
for (x in parms) {
DoSomethingWith(x)
}
}
BUT how how can
I think you need to provide a richer example:
niceplot<-function(...) {
parms=list(...)
for (x in parms) {
cat(x)
}
}
> e="e"
> niceplot(e)
e
On Mar 10, 2010, at 5:21 PM, ManInMoon wrote:
I have writtn a function where I pass a variable number of arguments.
I They are vectors and I
ManInMoon wrote:
Because I am asking for help...
In the time it has taken for you to ask your question and wait for
answers, you could have experimented yourself and actually learned
something. The only way you will learn the language is to actually try
using the language.
On 10 March
Thank you Ralf. I am starting with these things (just a couple of weeks). I
have a data base with temperature records of 90 consecutive days (along the
year) affecting the fertility (0 or 1) of animals and I want to identify
what set of temperatures have more negative effect and what is the magnit
numToPOSIXct <- function(v) {
now <- Sys.time()
Epoch <- now - as.numeric(now)
Epoch + v
}
Try this - where v is your numeric version of date
--
View this message in context:
http://n4.nabble.com/Numeric-to-Date-tp1588108p1588149.html
Sent from the R help mailing list archive at Nabb
I have writtn a function where I pass a variable number of arguments.
I They are vectors and I can manipulate them, but I need to get hold of the
name for a legend.
niceplot<-function(...) {
parms=list(...)
for (x in parms) {
DoSomethingWith(x)
}
}
BUT how how can I get something l
Dear All,
I want to sort a character type vector.
the vector is
[1] 4 5 6 8 9 11 Y 1 13 15 16 20 X 2 3 10 14 19 XY 7 12 18 17 22
[25] 21
and I want to sort 1-22 X Y XY or 1-22 X XY Y.
How can I do that?
Thanks,
__
R-help@r-project.org mail
I use this to make illustration for some calculus notes. There are
examples of shaded areas in there:
### Filename: Normal1_2009_plotmathExample.R
### Paul Johnson June 3, 2009
### This code should be available somewhere in
http://pj.freefaculty.org/R. If it is not
### email me
###Set mu and s
Hello,
Apologies in advance if this is a stupid question. I am running R on Ubuntu
9.
R version 2.9.2 (2009-08-24)
I am trying to work with plm. I think the library is installed, as I can do
> library(plm)
Loading required package: kinship
Loading required package: survival
Loading required pac
Hello,
Apologies in advance if this is a stupid question. I am running R on Ubuntu
9.
R version 2.9.2 (2009-08-24)
I am trying to work with plm. I think the library is installed, as I can do
> library(plm)
Loading required package: kinship
Loading required package: survival
Loading required pac
On Wed, Mar 10, 2010 at 4:42 PM, Xanthe Walker wrote:
> Hello,
>
> I am trying to complete a PCA on a set of standardized ring widths from 8
> different sites (T10, T9, T8, T7, T6, T5, T3, and T2).
> The following is a small portion of my data:
>
> T10 T9 T8 T7 T6 T5 T3 T2 1.33738 0.92669 0.91146
see
http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=7
for an example that may help.
>>> claytonmccandless 03/09/10 6:48 PM >>>
I want to shade the area under the curve of the standard normal density.
Specifically color to the left of -2 and on. How might i go about doing
this?
Th
On Wed, 10 Mar 2010, baptiste auguie wrote:
Hi,
it's generally considered a bad practice but try this,
eval(parse(text=AA))
library(fortunes)
fortune(106)
HTH,
baptiste
On 10 March 2010 07:46, jq81 wrote:
My question is represented by the following example.
For example, I have a charac
JR,
You need to use as.factor() for the DV (even if it is already a factor).
Also, your formula includes a variable not in your sample data, "IntDist",
perhaps you meant "FwyDist"?
Try:
zelig(as.factor(SFsubM) ~ Slope + Exposure + FwyDist + RTotEmp + RTotHh,
model="mlogit", data=TestData)
Also,
Hi,
I developed a package that requires 5 other packages. I was wondering if
anyone knows how can I automatically download and install the required
packages during the installation of my new package. My idea is to make this
process easier to the final user.
All the required packages are under bio
Hello,
I am trying to complete a PCA on a set of standardized ring widths from 8
different sites (T10, T9, T8, T7, T6, T5, T3, and T2).
The following is a small portion of my data:
T10 T9 T8 T7 T6 T5 T3 T2 1.33738 0.92669 0.91146 0.98922 0.9308 0.88201
0.92287 0.91775 0.82181 1.05319 0.92908 0.97
Try
data2$X<-factor(data2$X)
By the way, avoid call data as "data", matrix as "matrix", vector as
"vector".
cheers
milton
On Wed, Mar 10, 2010 at 4:35 PM, clee wrote:
>
> If anyone can help with this, I would greatly appreciate it.
>
> When I subset a dataframe, and then create a table of on
On 10-Mar-10 22:19:13, Marc Schwartz wrote:
> On Mar 10, 2010, at 4:03 PM, Ted Harding wrote:
>
>> Greetings all!
>> I'm facing a puzzle I have not been able to solve.
>> I need to make an EPS of a pie-chart (Yes, I know;
>> please don't bother to tell me! I just need to ...).
>>
>> I'm trying to
On Mar 10, 2010, at 4:03 PM, Ted Harding wrote:
> Greetings all!
> I'm facing a puzzle I have not been able to solve.
> I need to make an EPS of a pie-chart (Yes, I know;
> please don't bother to tell me! I just need to ...).
>
> I'm trying to do it with pie(), and I want to have
> just the plain
R version: 2.10.0
platform: i486-pc-linux-gnu
I'm trying to perform model selection from a data.frame object (creatively
named "data") using the leaps function, and I run across the following
error:
> leaps(data[,3:7], data[,1], nbest = 10)
Error in leaps.setup(x, y, wt = wt, nbest = nbest, nvmax
On Mar 10, 2010, at 3:29 PM, GULATI, BRIJESH (Global Markets FF&O NY) wrote:
> Is there easy way to convert numeric to date?
>
> For example:
>
> If I have,
>
> a = as.Date("2010-03-04")
>
> And, if run
>
>> as.numeric(a)
> [1] 14672
>
> Is there any function that I can use to convert
Greetings all!
I'm facing a puzzle I have not been able to solve.
I need to make an EPS of a pie-chart (Yes, I know;
please don't bother to tell me! I just need to ...).
I'm trying to do it with pie(), and I want to have
just the plain pie-chart with no annotations. So far
so good: "labels=rep(NA,
On Wed, 10 Mar 2010, GULATI, BRIJESH (Global Markets FF&O NY) wrote:
Is there easy way to convert numeric to date?
For example:
If I have,
a = as.Date("2010-03-04")
And, if run
as.numeric(a)
[1] 14672
Is there any function that I can use to convert 14672 back to the date.
You c
If anyone can help with this, I would greatly appreciate it.
When I subset a dataframe, and then create a table of on of the column
variables, the levels of that variable are retained from the parent
dataframe. Anyone know how to
for example, say I have data like so:
data:
X Y
a 2
b
Is there easy way to convert numeric to date?
For example:
If I have,
a = as.Date("2010-03-04")
And, if run
> as.numeric(a)
[1] 14672
Is there any function that I can use to convert 14672 back to the date.
Thx in advance,
Brijesh
--
Greetings all,
please consider the following data:
#Build Data frame
Slope<-c(1.291370, 12.208500, 2.110930, 0.578990, 5.019520, 0.807444,
0.554079
, 1.257080, 0.241504 , 0.184337 , 0.383044 , 0.342021)
Exposure<-c(790.54, 1167.79 , 845.58 , 1082.47 , 1189.61 , 677.17 ,
2058.56 , 469.09
Thank you!
On 10 March 2010 21:21, David Winsemius [via R] <
ml-node+1588077-2145101402-180...@n4.nabble.com
> wrote:
>
> On Mar 10, 2010, at 2:50 PM, ManInMoon wrote:
>
> >
> > It does help much.
> >
> > Just one line about x[-1]
> >
> > Is there more comprehensive help anywhere?
>
> http://cra
Hello,
I am trying to plot real-time data, refreshed at varying rates averaging
once per second from a TCP socket, but the display behaves inconsistently.
About 50% of the time, the plots (I have 3 in a single quartz display, via
par(mfrow=c(3,1)) are refreshed correctly, but the other 50% of refr
> Hi:
> I want to add a constant to an existing col of the data.frame. I
> have the following dataset:
>
>
> structure(list(x = c(1, 1, 1, 1, 1), y = c(1, 1, 1, 1, 1)), .Names =
> c("x",
> "y"), row.names = c(NA, 5L), class = "data.frame")
>
>
> I want to add a constant to col 1 and c
On Mar 10, 2010, at 2:50 PM, ManInMoon wrote:
It does help much.
Just one line about x[-1]
Is there more comprehensive help anywhere?
http://cran.r-project.org/doc/manuals/R-lang.html#Indexing
--
View this message in context:
http://n4.nabble.com/Deltas-or-changes-tp1585960p1587939.htm
Because I am asking for help...
On 10 March 2010 20:19, Kevin E. Thorpe [via R] <
ml-node+1587986-1699461774-180...@n4.nabble.com
> wrote:
> ManInMoon wrote:
> > Hi, I am new to R.
> >
> > What does a negative amount in an index do?
> >
> > i.e. x[-lenght[x]]
> >
> Why don't you try it and see f
It does help much.
Just one line about x[-1]
Is there more comprehensive help anywhere?
--
View this message in context:
http://n4.nabble.com/Deltas-or-changes-tp1585960p1587939.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help
I understand you can pass a variable number of arguments to a function that
is written to accept "..."
I have searched for any documentation on how to write such a function -
could someone tell me where to look please
--
View this message in context:
http://n4.nabble.com/Variable-arguments-to-f
I am having trouble getting my facets colored with "concentric" colors
by z level. This code give a fair representation of my problems
dealing a real dataset
cmtx <- matrix(, nrow=10, ncol=10)
cc <- (row(cmtx)-5)^2 + (col(cmtx)-5)^2
cc
#--
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [
ManInMoon wrote:
Hi, I am new to R.
What does a negative amount in an index do?
i.e. x[-lenght[x]]
Why don't you try it and see for yourself?
--
Kevin E. Thorpe
Biostatistician/Trialist, Knowledge Translation Program
Assistant Professor, Dalla Lana School of Public Health
University of Tor
There is no function in R AFAIK, where an IRT model is estimated using the
NPMML method (non-parametric marginal maximum likelihood). All MML methods in R
assume the population distribution is normal.
Now, the jml function in the MiscPsycho package uses joint maximum likelihood
for estimating
Hello R,
I am looking for non-parametric simulation in IRT. Is there any IRT
package that does non-parametric simulation?
helen L
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r
Got it.
Thanks again so much for the help.
Best,
Tim
>>> hadley wickham 3/10/2010 2:46 PM >>>
> By Q2 I was trying to refer to the Y-axis labels. For the polar plot, the
> Y-axis labels reside left of the panel. I was looking for a way to get the
> Y-axis labels to radiate out from the cente
> Run that function hourly with plyr
>
> output.hourly <- dlply(df.i1,"tshour",cor.dat)
Why not
output.hourly <- ddply(df.i1,"tshour",cor.dat)
? Generally you want to work with data frames in R, if at all possible.
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of St
Peter's suggestion
qdata[order(qdata$flow, decreasing=TRUE), ]
would work if qdata were a data.frame, where the
$column syntax picks out a column. You probably
have a matrix so use [,"flow"] instead of $flow
to extract the column called "flow".
qdata[order(qdata[,"flow"], decreasing=TRUE), ]
On 3/10/2010 1:01 AM, Petr PIKAL wrote:
> Dear all
> recently I tried to split vector of dates according to some particular
> date to 2 (more) chunks, but I was not able to perform correct setting.
>
> When I want split to 3 chunks it partially works however from help page I
> supposed to get re
> By Q2 I was trying to refer to the Y-axis labels. For the polar plot, the
> Y-axis labels reside left of the panel. I was looking for a way to get the
> Y-axis labels to radiate out from the center so it would be clear which line
> each label refers to. I still can't find any reference to movi
Please learn to Read The Fine Manual:
?"["
will give you the answer.
-Ista
On Wed, Mar 10, 2010 at 8:43 AM, ManInMoon wrote:
>
> Hi, I am new to R.
>
> What does a negative amount in an index do?
>
> i.e. x[-lenght[x]]
> --
> View this message in context:
> http://n4.nabble.com/Deltas-or-chan
If you are interested in machine learning in general, you might also
want to have a look at the CRAN Task View on Machine Learning &
Statistical Learning that contains this package, as well as others:
http://cran.r-project.org/web/views/MachineLearning.html
Best,
---
Ralf Bierig
Post-Doctoral As
I'm a fairly new R user and while I have a solution to my problem I'm
wondering if there is a better one.
In SAS it's common to use if/then logic along with a "do" statement to
make several things happen. While I could do the same thing in R
using a "for" loop, and "if" and {}, I've read that loo
Hi, I am new to R.
What does a negative amount in an index do?
i.e. x[-lenght[x]]
--
View this message in context:
http://n4.nabble.com/Deltas-or-changes-tp1585960p1587408.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-pro
Thanks much - very nice. I hadn't thought of that approach.
I dug around in the lattice source and found another way to do it so
for what it's worth, I'll post it - maybe it will be useful to
someone. Basically, I made a function from code found in
plot.trellis() that gets the grid layout
Dear Users,
Can I perform panel data (fixed effects model) out of sample forecasts using R?
Thanks in advance,
Ricardo.
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEA
Thank you Gavin for your help.
David, maybe I am not so clear on my question, sorry. My problem was that
when I wanted to reproduce results (or graphs) present in the book,
sometimes my results were quite different or I don not know how to repuduce
them. I will have a look to the documentation of
Thanks Gabor,
As I said I would like to use gsubfn, but I am having problems
installing it, which I assume are due to some conflict with the current
tcltk package
Below is the error I got after issuing install.packages("gsubfn")
Any advice?
###
* Installing *source* package 'gsu
James,
you may post your question to the R-SIG finance group with a small example.
If I understand your problem correctly it's like converting tick data of
financial time series into aggregates. (to 1-minute, hourly, daily ... data
sets ). There are packages available for this kind of task that
Thanks for these suggestions. I tried them out and I get the error message:
Error in qdata$flow : $ operator is invalid for atomic vectors
Can anyone offer further suggestions on how to extract the values from
atomic vectors?
Thanks again
Emma
--
View this message in context:
http://n4.nabble
If you're looking for business and technical justifications for a
business to adopt R, I wrote some up last year:
http://blog.revolution-computing.com/2009/02/how-to-get-it-to-accept-and-love-r.html
In summary:
R is mainstream
R is supported
R is high-quality
R leads commercial packages in innovat
Hadley,
Thanks for chiming in.
By Q2 I was trying to refer to the Y-axis labels. For the polar plot, the
Y-axis labels reside left of the panel. I was looking for a way to get the
Y-axis labels to radiate out from the center so it would be clear which line
each label refers to. I still can't
Hi Ista,
Many thanks, the plyr package was just what I needed.
Because I did such a bad job with my question (no data, etc etc), here
is my current solution:
First, I grabbed my data from PostgreSQL as follows:
library('RPostgreSQL')
m <- dbDriver("PostgreSQL")
con <-
dbConnect(m,user="user",pa
On Wed, Mar 10, 2010 at 6:07 PM, Fernando Henrique Ferraz Pereira da
Rosa wrote:
> reason I'm writing you. If you have any examples (preferably with
> references) and/or experience in a similar scenario please do write me. I've
>
There is a recent reference in The Economist (search the ML archives
Fair enough.
CS
-
Corey Sparks, PhD
Assistant Professor
Department of Demography and Organization Studies
University of Texas at San Antonio
501 West Durango Blvd
Monterey Building 2.270C
San Antonio, TX 78207
210-458-3166
corey.sparks 'at' utsa.edu
https://rowdyspace.utsa.edu/users/ozd504/ww
This list is the wrong place for that question. The posting guide tells
you, in bold, to contact the package maintainer first.
If you had already done that, and didn't hear back from him, then you
should tell us, so that we know you followed the guide.
"Corey Sparks" wrote in message
news:
Hi R users,
I'm using the survey package to calculate summary statistics for a large
health survey (the Demographic and Health Survey for Honduras, 2006), and
when I try to calculate the variances for several variables, I get negative
numbers. I thought it may be my data, so I ran the example on t
Dear r-useRs,
After a couple of years in a 'R exile' of sorts, I've recently changed jobs
and my current employer (an American multinational in the food manufacturing
industry) is much more open than my past employer (which wouldn't even want
to hear about anything that didn't begin with SAS...).
David:
The best advice I can give is: read "An Introduction to R" carefully, taking
particular note of the examples and the ideas of vectorization, factors,
lists, etc The bottom line is: yes, you can mimic the way SAS or other
ancient procedural languages do things in R (e.g. using nested ifelse(
Thanks for providing the code that allows me to reproduce the problem.
It looks like the prediction routine for some reason returns "0" as
prediction for some trees, thus causing the problem observed. I'll look
into it.
Andy
From: Dror
>
> Hi,
> Thank you for your replies
> as for the predic
>
> Your line of code:
>
> zzz.aov <- aov(Intensity ~ Group + Error(Sample), data = zzzanova)
>
> indicates that you are trying to do a repeated measures ANOVA, not just an
> ANOVA. The Error(Sample) term in your expression indicates that Sample is a
> within subjects factor, which I presume is
On Mar 10, 2010, at 11:47 AM, David Young wrote:
I'm a fairly new R user and while I have a solution to my problem I'm
wondering if there is a better one.
In SAS it's common to use if/then logic along with a "do" statement to
make several things happen. While I could do the same thing in R
us
Is this what you want:
> yrData <- data.frame(year=sample(1990:2000, 100, TRUE),
+ species=sample(1:3,100,TRUE), loc=sample(1:2,100,TRUE))
> byYear <- split(yrData, yrData$year)
>
> byYear[1:3]
$`1990`
year species loc
39 1990 3 2
57 1990 3 1
62 1990 1 1
68 1990
Here is how you can do the lookup:
> # lookup up the school
> lkup <- read.table(textConnection("1'BENJAMIN FRANKLIN ES'
465
+ 2'CALVIN COOLIDGE SCHL'379
+ 3'EAST MS' 590
+ 4'HORACE MANN SCHL'374
+ 5'MAC ARTHUR SCHL'
Hi All,
If given a dataframe (long form) with Year, Species, and Location,
How would I write a function that would create a unique matrix of Species &
Location for each Year?
What I've tried doing is the following:
data #dataframe
dataT<-table(data$Species,data$Location,data$Year) #creates table
Hello Folks, I have a need to generate Graphic output files (gif, jpeg, pdf,
etc..) on a Solaris Environment, however this environment does not have X11
setup and setting up X11 would be a last resort if required. I have attempted
to install GDD and Cairo without success up to this point. Is
I'm a fairly new R user and while I have a solution to my problem I'm
wondering if there is a better one.
In SAS it's common to use if/then logic along with a "do" statement to
make several things happen. While I could do the same thing in R
using a "for" loop, and "if" and {}, I've read that loo
Apologies for the previous email, I think I got it sorted out now.
Lorenzo
rm(list=ls())
library(Cairo)
set.seed(1234)
trivial_matrix<-matrix(rnorm(25),nrow=5)
CairoPDF("matrix2D.pdf")
oldpar<-par( mar = c(4.5,5, 2, 1) + 0.1,
cex.axis=1.4,cex.lab=1.6,cex.main=1.6)
color2D.matplot(trivia
Hi Jim,
And thanks for helping. My (hopefully) last question concerns the use of
a non-gray color scale.
How do I use e.g. a rainbow colorscale? This issue has already been raised
http://tinyurl.com/ylhcbra
and over there it is dealt with by hand. I just wonder whether anything
similar is doa
On Mar 10, 2010, at 10:34 AM, Carlos Petti wrote:
Dear list,
I have a list of three matrices :
i = list(matrix(1:4,2,2), matrix(3:6,2,2), matrix(9:12,2,2))
I would like to sum the matrices, as follows :
[,1] [,2]
[1,] 13 19
[2,] 16 22
> Reduce("+", i)
[,1] [,2]
[1,] 13 19
[2,]
On Mar 10, 2010, at 10:30 AM, arnaud chozo wrote:
Hi,
I've a beginner question. I'm trying to extract data in my dataframe
according to some nested rules.
I have something like the dataframe test.df:
test.df = data.frame(V1=c(rep("A",10), rep("B",10), rep("C",5)),
V2=c(rep(1,5), rep(2,5), re
Hi,
Look at the R News 8/1 in the R Help Desk.
Alain
On 10-Mar-10 16:34, Carlos Petti wrote:
Dear list,
I have a list of three matrices :
i = list(matrix(1:4,2,2), matrix(3:6,2,2), matrix(9:12,2,2))
I would like to sum the matrices, as follows :
[,1] [,2]
[1,] 13 19
[2,] 16 22
I used this
One more bit: I got as far as this, thinking it might help:
Using a data file that I know has all the necessary denominators, I
created a dataframe of school names (as factor) and TotalStudentsEnrolled.
data.frame(data$School[!duplicated(data$School)],
data$TotalStudentsEnrolled[!duplicated
Dear list,
I have a list of three matrices :
i = list(matrix(1:4,2,2), matrix(3:6,2,2), matrix(9:12,2,2))
I would like to sum the matrices, as follows :
[,1] [,2]
[1,] 13 19
[2,] 16 22
I used this code :
k <- i[[1]]
for (j in (2:length(i))) {
k <- k + i[[j]]}
But, is it possible to sum witho
1 - 100 of 159 matches
Mail list logo