I find the following even more confusing as I thought that xts was a
subclass of zoo and I'd expected that the conversion would have been
more transparent
> aggregate (vv, as.yearmon(index(vv)), mean)
Feb 2010 6.08
> xts (aggregate (vv, as.yearmon(index(vv)), mean))
x
Jan 2010 6.0
Hi James,
I don't know how to solve it with "tapply" (something with split I
think..), but you could use "plyr" (from Hadley Wickham).
library(plyr)
# Generate some data
set.seed(321)
myD <- data.frame(
Place = sample(c("AWQ","DFR", "WEQ"), 10, replace=T),
Light = sample(LETTERS[1:2], 15,
Hi, all
I am trying to get the basis matrix and penalty matrix for natural
cubic splines. In the "splines" package of R,"ns" can
generate the B-spline basis matrix for a natural cubic spline. How can
I get the basis matrix and penalty matrix for natural cubic
spline.
Thanks a lot!
Lee
[
John Fox wrote:
> Dear Philippe,
>
> The linear.hypothesis() function in the car package should do what you want.
>
> I hope this helps,
> John
Also, at least in many cases, anova.mlm in the base package.
The catch is that the "L" of the LBM==0 has to correspond to a linear
model reduction. T
Hi,
I am trying to SSH to a remote server through R script. In other words, I
would like to know how I can get a SSH connection to the remote server and
then execute commands on that server with the R script.
So in bash, I would normally type ssh -lusername remoteserver.com; press
enter and then
I downloaded the code, as Duncan Murdoch suggested. I also used sink() as
suggested by others and found that the two methods gave identical results. I
then fixed the bug in a private file and tried it out on a number of
examples. It now seems to work fine, as far as I can tell.
>From CRAN, I foun
I removed the ceiling and it works! Thanks a heap, that was driving me
crazy!
--
View this message in context:
http://n4.nabble.com/Problem-with-Loops-tp1794288p1801623.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project
Thanks a lot!
On Apr 8, 2010, at 10:50 PM, Felix Andrews wrote:
The default settings come from
trellis.par.get("reference.line")
On 9 April 2010 13:07, Wen Huang wrote:
Hi,
I wonder if anyone knows how to control color and darkness of the
background
grid generated by ' type = c("g", "p
It works perfectly! Thanks!
On Apr 8, 2010, at 10:32 PM, David Winsemius wrote:
On Apr 8, 2010, at 11:07 PM, Wen Huang wrote:
Hi,
I wonder if anyone knows how to control color and darkness of the
background grid generated by ' type = c("g", "p") ' in a lattice
plot (e.g., in xyplot). Th
The default settings come from
trellis.par.get("reference.line")
On 9 April 2010 13:07, Wen Huang wrote:
> Hi,
>
> I wonder if anyone knows how to control color and darkness of the background
> grid generated by ' type = c("g", "p") ' in a lattice plot (e.g., in
> xyplot). The documentation doe
On Apr 8, 2010, at 11:07 PM, Wen Huang wrote:
Hi,
I wonder if anyone knows how to control color and darkness of the
background grid generated by ' type = c("g", "p") ' in a lattice
plot (e.g., in xyplot). The documentation does not seem to offer a
way to change them.
I wonder.
Here'
# obtain power
power <- array(numeric(nr*np), dim=c(nr,np))
for (i in 1:np){
for (j in 1:nr){
result <- pwr.t.test(n = r[j], d = p[i],
sig.level = .05, power = NULL,
alternative = "two.sided")
power[j,i] <- ceiling(result$power)
}
}
First problem. Why are you calling ceil
Hello,
mtesche wrote:
Hello,
I am trying to write a script with the end goal of graphing power (y) as a
result of sample size (x) at a variety of effects sizes. I am new to loops,
and I think my problem is there. Here's the script, which is modified from
the script found at the bootom of
http
library(vcd)
data("Titanic")
mosaic(Titanic)
mosaic(~ Sex + Age + Survived, data = Titanic,main = "Survival on the
Titanic", shade = TRUE, legend = TRUE) ## mosaic one
data("HairEyeColor")
mosaic(HairEyeColor, shade = TRUE, expected = list(c(1,2), 3)) ## mosaic tow
I would like to put the two mo
Hello,
I am trying to write a script with the end goal of graphing power (y) as a
result of sample size (x) at a variety of effects sizes. I am new to loops,
and I think my problem is there. Here's the script, which is modified from
the script found at the bootom of
http://www.statmethods.net/s
Hi,
I wonder if anyone knows how to control color and darkness of the
background grid generated by ' type = c("g", "p") ' in a lattice plot
(e.g., in xyplot). The documentation does not seem to offer a way to
change them.
Thanks a lot!
Wen
__
On 9 April 2010 11:18, David Winsemius wrote:
> On Apr 8, 2010, at 8:29 PM, array chip wrote:
>
>> David,
>>
>> Thansk again! Sarkar's Lattice book is excellent source for lattice. Here
>> is a link for all the figures and codes used in the book. You example is
>> figure 13.7.
>>
>> http://lmdvr.r
I am trying to calculate quantiles of a data frame column split up by
two factors:
# Calculate the quantiles
quarts = tapply(gdf$tt, list(gdf$Runway, gdf$OnHour), FUN=quantile,
na.rm = TRUE)
This does not work:
> quarts
04L 04R 15R 22L 22R 2732
33L
On Apr 8, 2010, at 8:29 PM, array chip wrote:
David,
Thansk again! Sarkar's Lattice book is excellent source for lattice.
Here is a link for all the figures and codes used in the book. You
example is figure 13.7.
http://lmdvr.r-forge.r-project.org/figures/figures.html
I got the first po
Thank you very much for your help, Prof. Harrell. I was making the bad
mistake of judging the appearance of the calibration plots without
actually calculating the regression line. I was misjudging slopes of
0.8 or 0.9 as being slopes greater than 1.
Kind regards,
Mark Seeto
> Mark,
>
> Try
>
> s
David,
Thansk again! Sarkar's Lattice book is excellent source for lattice. Here is a
link for all the figures and codes used in the book. You example is figure 13.7.
http://lmdvr.r-forge.r-project.org/figures/figures.html
I got the first point! For the second point below, Figure 13.7 an excell
Mark Seeto wrote:
This isn't a question about R, but I'm hoping someone will be willing
to help. I've been looking at calibration plots in multiple regression
(plotting observed response Y on the vertical axis versus predicted
response [Y hat] on the horizontal axis).
According to Frank Harrell'
See ?plotmath for how to add mathematical symbols and markup to plots.
e.g.
xyplot(1:10 ~ 1:10 | factor(1:2),
strip = strip.custom(factor.levels =
expression("< 90 kg", "" >= 90 * " kg")))
On 9 April 2010 06:45, mahesh samtani wrote:
> Hello,
> I am trying to use ≥ symbol in the Trellis
Hi Paul, Jim, Dennis, and others,
I got RODBC and SQL Server to create a date variable in R (see below). I'm
pretty sure the commands I was issuing before were working but that I was
stripping off the date class every time I submitted the command "fix(mydata)."
So I kept getting the mistaken i
On Apr 8, 2010, at 6:20 PM, Esmail wrote:
Hello,
Is there an easy way to format the output of a result table that R
generates from a regression? I like the table, but would like to
limit the number of decimal points in the entries if possible.
For instance I would like only 3 digits of preci
This isn't a question about R, but I'm hoping someone will be willing
to help. I've been looking at calibration plots in multiple regression
(plotting observed response Y on the vertical axis versus predicted
response [Y hat] on the horizontal axis).
According to Frank Harrell's "Regression Modeli
Hello,
Is there an easy way to format the output of a result table that R
generates from a regression? I like the table, but would like to
limit the number of decimal points in the entries if possible.
For instance I would like only 3 digits of precision for the Value,
Std.Error. (And if it wou
Dear All,
I found this nice example of PCA application on the web
http://www.r-bloggers.com/principal-components-and-image-reconstruction/
and wanted to reproduce the results for myself. I installed biOps the usual
way
and got the message
*package 'biOps' successfully unpacked and MD5 sums chec
Bessy wrote:
Dear all R users,
I am building a Cox PH model on a small dataset. I am wondering how to
measure the predictive power of my cox model? Normally the ROC curve or Gini
value are used in logistic regression model. Is there any similar
measurement suitable for Cox model?
Also if I use
Hi,
On Thu, Apr 8, 2010 at 1:18 PM, JMark wrote:
>
> I'm trying to do:
> randomForest(f, data = moths.train)
>
> But I get this error:
> Error in randomForest.default(m, y, ...) :
> Need at least two classes to do classification.
>
> When I look at the data for this, I realize there are no posit
On 08/04/2010 5:16 PM, David.Epstein wrote:
There is quite a long piece of code defining a certain function in one of the
R packages.
I think the code has a bug and I want to get the code into a file so that I
can take a proper look, and possibly fix it.
how does one do this? (I mean getting the
I can use as.Date() on the result from an sql date field, but this may depend
on the backend database engine too. There may also be some sensitivity to
character set encoding used on the database and the client, and from you email
it looks a bit like you could have some problems in this respect.
On Thu, 8 Apr 2010, Dimitri Liakhovitski wrote:
Dear everyone,
I was not sure if I should start a new topic - but the task is the
same, so I am staying within the original one.
Originally, I stated that my data frame has a lot of NAs. Now I am
discovering - it's having a lot of zeros (rather tha
Hi David,
You can use sink, like this:
sink(file="lm.R") ## redirects output to the file lm.R
print(lm) #prints the lm function
sink() #r redirects output back to the console.
Or just download the source...
-Ista
On Thu, Apr 8, 2010 at 10:16 PM, David.Epstein
wrote:
>
> There is quite a long pi
David -
You can do what you want pretty easily using sink.
Suppose you want the source code for function "blah"
in the file "blah.func":
sink('blah.func')
print(blah)
sink()
- Phil Spector
Statistical Computing F
There is quite a long piece of code defining a certain function in one of the
R packages.
I think the code has a bug and I want to get the code into a file so that I
can take a proper look, and possibly fix it.
how does one do this? (I mean getting the code into a file, not fixing the
bug.) I sup
I try to do a test for dirichlet process for Multivariate normal, but Winbugs
always says "expected multivariate node", does that mean I miss something at
initialization? I will really appreciate the help to solve this problem
Here is the R code, and Winbugs code.
model
{
for(i in 1:N)
I don't think this is possible. With an opaque background you can get back
the background color just by overwriting, but any additional painting can only
increase the opacity so you can't get back to transparent.
-thomas
On Thu, 8 Apr 2010, Terry Therneau wrote:
I have a case where th
Hi Henrique,
Thank you so much, that's exactly what I want!
Thanks again
Tengfei
On Thu, Apr 8, 2010 at 3:28 PM, Henrique Dallazuanna wrote:
> See ?eapply
>
> On Thu, Apr 8, 2010 at 5:01 PM, Tengfei Yin wrote:
> > Hi
> >
> > I want to simplify my problem into a prototype, how to write a funct
Hello,
I am trying to use ⥠symbol in the Trellis custom strip. The ascii ALT Key
for this symbol is 242. However, when I try "\242 90 kg" I get the ¢ symbol
in the trellis custom strip. Can some one kindly help me?
Thanking you in advance,
MNS
[[alternative HTML version deleted]]
___
See ?eapply
On Thu, Apr 8, 2010 at 5:01 PM, Tengfei Yin wrote:
> Hi
>
> I want to simplify my problem into a prototype, how to write a function to
> get all the object in your current environment, e.g. .GlobalEnv, and print
> their mode?
>
> For example, if I have object a,b,c... in my environmen
Do you have the tools ? What operating system are you using ? What
happens if you do this:
> code <- '#include \nSEXP f(){\n return R_NilValue ; }'
> writeLines( code, "test.c" )
> system( "R CMD SHLIB test.c" )
> dyn.load( "test.so" )
> .Call( "f" )
Romain
Le 08/04/10 20:28, satu a écrit :
Dear everyone,
I was not sure if I should start a new topic - but the task is the
same, so I am staying within the original one.
Originally, I stated that my data frame has a lot of NAs. Now I am
discovering - it's having a lot of zeros (rather than NAs) - and they
should be ignored when the subgro
I find the following even more confusing as I thought that xts was a
subclass of zoo and I'd expected that the conversion would have been
more transparent
> aggregate (vv, as.yearmon(index(vv)), mean)
Feb 2010 6.08
> xts (aggregate (vv, as.yearmon(index(vv)), mean))
x
Jan 2010 6.
All is done in R 2.10.1 wiht the package "inline" version 0.3.4,,,
this are the packages that I have loaded into the workspace
> search()
[1] ".GlobalEnv""package:inline""package:stats"
"package:graphics" "package:grDevices" "package:datasets" "package:rcom"
[8] "package:r
Le mercredi 07 avril 2010 à 18:03 +1000, William Venables a écrit :
[ Snip ... ]
> [ ... ] The effect is
> somewhat like that of the use of the .Data directory in S-PLUS, (a
> program not unlike R), though somewhat more manually driven.
I'm not sure
On Apr 8, 2010, at 4:03 PM, Jun Shen wrote:
David,
all.equal() only tells how many mismatches there are including
missing values but it doesn't tell me the location of each mismatch.
Yes, I noticed that after further testing. I agree Charles' solution
is more informative and I wonder if
Hi Dave,
first of all, fitting starting values of a dynamic model the same way
like its parameters is indeed the usual method. In that case parameters
*and* some or all initial value(s) of the dynamic model are both in fact
'parameters' for the statistical model fitting problem.
Fitting a no
David,
all.equal() only tells how many mismatches there are including missing
values but it doesn't tell me the location of each mismatch.
For example, if I have one NA mismatch and three numerical mismatches,
all.equal(a,b) gives
[1] "Component 2: 'is.NA' value mismatch: 1 in current 0 in targe
Hi
I want to simplify my problem into a prototype, how to write a function to
get all the object in your current environment, e.g. .GlobalEnv, and print
their mode?
For example, if I have object a,b,c... in my environment,
a=1;b='test';c=matrix(0,3,3).
I want to write a function myfun(), whe
On Apr 8, 2010, at 3:13 PM, array chip wrote:
David,
That does the job! Thanks a lot.
Now I am very very close to what I want. Still have a couple of
small adjustments to make.
1. I use drape=TRUE to draw grid and color on the surface, is there
a parameter to adjust the density of the g
If you want to look at the dataframe, then consider using View.
On Thu, Apr 8, 2010 at 11:14 AM, Paul Miller wrote:
> Hello Everyone,
>
> I am a newbie with about a month's worth of experience using R. I've just
> spent a little time learning how to work with date values. Mostly, this has
> invo
On Thu, 8 Apr 2010, ECAMF wrote:
Dear all,
I've just migrated from STATA to R for runing panel regressions and I was
very happy to discover the plm package. However, I have a problem when
trying to access the "Total Sum of Squares" and "Residual Sum of Squares" on
this output:
summary(output
On Thu, 8 Apr 2010, seral wrote:
Hello everyone,
I have a peoblem to create the twoways effect in the plm package.
when i try to create the following
dsn1<-plm(lnQ~lnC+lnL+lnM+lnE+eco+RD,data=newdata,effect="twoways",model="within")
i have this error:
Error in rep.int(c(1, numeric(n)), n
David,
That does the job! Thanks a lot.
Now I am very very close to what I want. Still have a couple of small
adjustments to make.
1. I use drape=TRUE to draw grid and color on the surface, is there a parameter
to adjust the density of the grid?
2. Is there a way that I can add grid to the a
On Apr 8, 2010, at 1:34 PM, Jun Shen wrote:
David,
Thanks for the suggestion. Now I have worked out a general solution.
Assume "a" and "b" are two data frames with same dimensions
1. Call identical(a,b) to get an overall assessment. If you get a
FALSE
2. Call which(mapply(identical,unlist(
I have a case where the easiest way to draw a particular symbol would be
to draw something a little bigger, and then use polygon(... , col=0) to
erase the extra stuff. Just how to do this best when par('bg') =
'transparent' is, however, eluding me. I've looked through the archives
and the book R
sorry, it was read, indeed.
TIA
Leonardo K. Shikida
Vetta Labs
+55(31)2551-6936 ext 203
http://www.vettalabs.com
On Thu, Apr 8, 2010 at 3:43 PM, David Winsemius wrote:
>
> On Apr 8, 2010, at 2:14 PM, Leonardo K. Shikida wrote:
>
>> Hi
>>
>> I am trying this
>>
>>> x <- read.table("/home/kenj
On Apr 8, 2010, at 2:14 PM, Leonardo K. Shikida wrote:
Hi
I am trying this
x <- read.table("/home/kenji/1245/GDS1_2grps_.cls", header = F,
skip = 2)
x <- read.table("/home/kenji/1246/MYCset.cls", header = F, skip = 2)
Warning message:
In read.table("/home/kenji/1246/MYCset.cls", header =
Hi
I am trying this
> x <- read.table("/home/kenji/1245/GDS1_2grps_.cls", header = F, skip = 2)
> x <- read.table("/home/kenji/1246/MYCset.cls", header = F, skip = 2)
Warning message:
In read.table("/home/kenji/1246/MYCset.cls", header = F, skip = 2) :
incomplete final line found by readTableHe
On Thu, Apr 8, 2010 at 11:32 AM, satu wrote:
> I want to run some R script using the inline package (which allows to create
> and run inline C++ code in my humble understanding).
> So, after loading the required packages and copy and paste the example that
> runs C code (in the Reference Manual a
David,
Thanks for the suggestion. Now I have worked out a general solution.
Assume "a" and "b" are two data frames with same dimensions
1. Call identical(a,b) to get an overall assessment. If you get a FALSE
2. Call which(mapply(identical,unlist(a),unlist(b))==FALSE), you will get a
result like
I'm trying to do:
randomForest(f, data = moths.train)
But I get this error:
Error in randomForest.default(m, y, ...) :
Need at least two classes to do classification.
When I look at the data for this, I realize there are no positive cases of
this item:
[1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
See:
http://n4.nabble.com/panel-data-td1749549.html
On Thu, Apr 8, 2010 at 12:55 PM, Richard Saba wrote:
> I have a data set with observations on 549 cities spanning an 18 year
> period. However, some of cities did not report in one or more of the 18
> years. I would like to implement the proce
I want to run some R script using the inline package (which allows to create
and run inline C++ code in my humble understanding).
So, after loading the required packages and copy and paste the example that
runs C code (in the Reference Manual as a PDF), I have a compilation error.
Any body has eve
Dear list
I am experiencing a very annoying problem with mtext, although I have
been using this command for many years. The following code prints
"test" twice in the outer margin, once at .7 where it should be, and
once at the bottom somewhere. I also notice that the command takes
longer t
Good afternoon everyone,
I am pleased to confirm the details of the next LondonR meeting:
Date:Wednesday 4th May
Time:6pm - 9pm
Venue: The Shooting Star
125- 129 Middlesex Street
E1 7JF
(Nearest Tubes- Liverpool Street, Moorgate or Bank)
I will distribu
Dear Philippe,
The linear.hypothesis() function in the car package should do what you want.
I hope this helps,
John
John Fox
Senator William McMaster
Professor of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
web: so
I am working on a Windows XP machine with R 2.10.1 and a recent
installation of MiKTeX 2.8. I use LyX (www.lyx.org) to write documents
and have it set up to run Sweave, Stangle, and make the PDF through R
using a batch script and a MakeSweave.R file. This system worked just
fine until I ran some Mi
I have a data set with observations on 549 cities spanning an 18 year
period. However, some of cities did not report in one or more of the 18
years. I would like to implement the procedure suggested by Wooldridge
section 17.1.3 in his "Econometric analysis of cross section and panel data"
to corre
Thanks so much! Duncan, I appreciated!
On Thu, Apr 8, 2010 at 5:03 AM, Duncan Murdoch wrote:
> On 07/04/2010 4:24 PM, Changbin Du wrote:
>
>> Hi, r-community,
>>
>> This morning, I MET the following problem several times when I try to
>> attach
>> the data set.
>>
>> When I closed the current co
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Lee William
> Sent: Thursday, April 08, 2010 4:40 AM
> To: r-help@r-project.org
> Subject: [R] subsetting a matrix with specified no of columns
>
> Hello! All,
>
> I am working
On Wed, 7 Apr 2010, thedoctor81877 wrote:
Hullo,
I am trying to use the leaps package, & keep getting the following error:
Error in leaps.setup(x, y, wt = wt, nbest = nbest, nvmax = NCOL(x) + int, :
y and x different lengths
x might be a data frame rather than a matrix.
In any case, althou
On Thu, 8 Apr 2010, ONKELINX, Thierry wrote:
Dear Thomas,
Thank you for your informative answer. We used epi.stratasize() to
estimate the required sample size per stratum. Notice in the example
below that it can select a sample size smaller than 2 in the very small
strata. Would you recommend t
This reads like homework. You should show some evidence where you are stuck
or pick up an R book/manual/introduction after which you should be able to
do this yourself quite easily.
Daniel
-
cuncta stricte discussurus
-
-
cu
On Thu, Apr 8, 2010 at 11:42 AM, Sergey Goriatchev wrote:
> Thank you, Gabor! This is a very elegant solution.
> But instead of general last day of month in the index, how can I have
> last day of each month as they are presented in "a", for example, not
> March 31, but March 27?
>
Try this:
> a
Hello,
I have a MANOVA model and I want to test the following hypothesis: LBM =
0 where B is the parameter estimates.
Is there any function to do this in R?
Cheers,
Philippe
--
Philippe Hupé
Institut Curie, CNRS UMR 144, INSERM U900
26 rue d'Ulm
75005 Paris - France
Email : philippe
Scott,
This is a good explanation and a good practice.
Thank you,
John
--- On Thu, 4/8/10, Waichler, Scott R wrote:
> From: Waichler, Scott R
> Subject: Re: 3-D response surface using wireframe()
> To: "arrayprof...@yahoo.com"
> Cc: "r-help@r-project.org"
> Date: Thursday, April 8, 2010, 9
On 2010-04-08 9:10, Hadley Wickham wrote:
Remove the comma and count.fields gives 11 for all rows.
From your other post(s) on escaped quotes, I assume that
this won't solve your problem with the existing files. (:
Right - but assuming I'm not crazy, that should cause an error in
read.csv, righ
On Apr 8, 2010, at 11:28 AM, arindam fadikar wrote:
On Thu, Apr 8, 2010 at 5:38 PM, David Winsemius > wrote:
On Apr 8, 2010, at 1:45 AM, arindam fadikar wrote:
Dear users,
How to get a symmetric square root of a positive definite matrix? I
have
tried using spectral decomposition, but so
On Thu, 8 Apr 2010, arindam fadikar wrote:
On Thu, Apr 8, 2010 at 5:38 PM, David Winsemius wrote:
On Apr 8, 2010, at 1:45 AM, arindam fadikar wrote:
Dear users,
How to get a symmetric square root of a positive definite matrix? I have
tried using spectral decomposition, but some eigen valu
Thank you, Gabor! This is a very elegant solution.
But instead of general last day of month in the index, how can I have
last day of each month as they are presented in "a", for example, not
March 31, but March 27?
Regards,
Sergey
On Thu, Apr 8, 2010 at 17:27, Gabor Grothendieck
wrote:
> Omit re
try this,
install.packages("expm", repos="http://R-Forge.R-project.org";)
On 8 April 2010 17:28, arindam fadikar wrote:
> On Thu, Apr 8, 2010 at 5:38 PM, David Winsemius wrote:
>
>>
>> On Apr 8, 2010, at 1:45 AM, arindam fadikar wrote:
>>
>> Dear users,
>>>
>>> How to get a symmetric square roo
Omit rep. You just want a <- zoo(1:9, ...). To get the last day of
the month you don`t need b since as.Date.yearmon will give it with the
argument frac = 1:
> aggregate(a, as.Date(as.yearmon(time(a)), frac = 1), tail, 1)
2009-03-31 2009-04-30 2009-05-31 2009-06-30
2 5
Hello everyone,
I have a peoblem to create the twoways effect in the plm package.
when i try to create the following
dsn1<-plm(lnQ~lnC+lnL+lnM+lnE+eco+RD,data=newdata,effect="twoways",model="within")
i have this error:
Error in rep.int(c(1, numeric(n)), n - 1L) : negative length vectors
are
On Thu, Apr 8, 2010 at 5:38 PM, David Winsemius wrote:
>
> On Apr 8, 2010, at 1:45 AM, arindam fadikar wrote:
>
> Dear users,
>>
>> How to get a symmetric square root of a positive definite matrix? I have
>> tried using spectral decomposition, but some eigen values come out to be
>> complex. Is t
Hello, everyone
I have the following problem:
Say I have an irregular zoo timeseries like this:
a <- zoo(rep(1:9), as.Date(c("2009-03-20", "2009-03-27", "2009-04-24",
"2009-04-25", "2009-04-30", "2009-05-15", "2009-05-22", "2009-05-29",
"2009-06-26")))
and I have regular zoo timeseries like this
Hello Everyone,
Â
I am a newbie with about a month's worth of experience using R. I've just spent
a little time learning how to work with date values. Mostly, this has involved
converting text values into dates.
Â
So far, I've managed to figure out how to do this in R proper using as.Date.
How
> Remove the comma and count.fields gives 11 for all rows.
> From your other post(s) on escaped quotes, I assume that
> this won't solve your problem with the existing files. (:
Right - but assuming I'm not crazy, that should cause an error in
read.csv, right? It shouldn't just parse the file reg
Hullo
I may have missed something blindingly obvious here. I'm using xts to
handle some timeseries data. I've got daily measurements for 100
years. If I try to reduce the error rate by taking means of each
month, I'm getting what at first sight appears to be conflicting
information. Here's
On Apr 8, 2010, at 10:01 AM, Hadley Wickham wrote:
Can write.table and read.table really be so asymmetric?
write() is a wrapper for cat() and read() is a wrapper for scan()
so the
question should really be can cat() and scan() be so asymmetric.
Looking at
their help pages, I would say tha
Assuming they are of the same length try this:
> library(zoo)
> # test data
> A <- zoo(1:3, Sys.Date() + 1:3)
> B <- zoo(4:6, Sys.Date() + 14:16)
>
> time(A) <- time(B)
> A
2010-04-22 2010-04-23 2010-04-24
1 2 3
Next time please provide test data with your post.
On Thu
Whew, figured it out through trial and error.
In case anyone else runs into this problem, the issue ended up being with the
data in one of the columns. I knew I didn't have any actual missing values, but
one of the columns is a text field which can have the literal value of "NA". I
guess R wa
Dear all R users,
I am building a Cox PH model on a small dataset. I am wondering how to
measure the predictive power of my cox model? Normally the ROC curve or Gini
value are used in logistic regression model. Is there any similar
measurement suitable for Cox model?
Also if I use C-index statis
Hi
r-help-boun...@r-project.org napsal dne 08.04.2010 16:23:53:
>
> Hi
>
> So my particular problem is this:
>
> I have a row vector of length 5200 elements - specifically created by
>
> x<-rbinom(5200,1,0.5)
> y<-matrix(x,nrow=1,ncol=5200)
> y
>
> now, each element is either a 0 or a
Hi,
I have two zoo objects (time series of same frequency) say A and B. I
need to exchange A's dates for B's.
Is there and easy way?
I managed to do it by converting A to a vector and pasting it on a zoo
vector (all ones) with B's dates but I wonder if there is an easier way
by some "zoo
Hadley,
The cause of the count.fields result is the comma in 'nftc,%20'
at about column 300 (for me).
Since commas between quotes should normally not matter, this
must be due to the comma appearing inside escaped quotes, i.e.
we have: "abc\"def,ghi\"jkl".
Remove the comma and count.fields gives
just convert your vector from 0,1 to .995,1.005 and use cumprod
On Thu, Apr 8, 2010 at 10:22 AM, Redhwan wrote:
>
> Hi
>
> So my particular problem is this:
>
> I have a row vector of length 5200 elements - specifically created by
>
> x<-rbinom(5200,1,0.5)
> y<-matrix(x,nrow=1,ncol=5200)
> y
>
>
Dear all,
I've just migrated from STATA to R for runing panel regressions and I was
very happy to discover the plm package. However, I have a problem when
trying to access the "Total Sum of Squares" and "Residual Sum of Squares" on
this output:
> summary(output)
Oneway (individual) effect Withi
Hi
So my particular problem is this:
I have a row vector of length 5200 elements - specifically created by
x<-rbinom(5200,1,0.5)
y<-matrix(x,nrow=1,ncol=5200)
y
now, each element is either a 0 or a 1 - e.g. it could be
(0,1,1,1,1,0,0,0,1,1,1) e.t.c.
when the element is a 1, i need to
1 - 100 of 145 matches
Mail list logo