If I look at the data for one of the countries (Brazil), I see NAs in
the ranges. How is the following condition handled to determine the
"spell length"? Are values propogated forward"
426 1/12/00 Brazil (RS) 7.5 2000-01-12
425 3/18/00 Brazil (RS) 7.5 2000-03-18
424 3/31/00 Brazil (RS)
I am using wireframe from the lattice package, with the shade option set
to TRUE. When I output to PDF or Postscript, a line gets drawn around
each polygon of my surface which causes ugly Moiré effects and doesn't
make sense in my application (think the plot of Maunga Whau--gridlines
don't make
I think I understand it now. So if there is any change (even very
small), then that starts a new interval.
On Sat, Jul 26, 2008 at 9:38 PM, Jia Ying Mei <[EMAIL PROTECTED]> wrote:
> Hi Jim,
>
> I did define it, although I guess I wasn't clear. The spell length is
> essentially the interval of tim
The help file for dwtest says
formula: a symbolic description for the model to be tested (or a fitted
"lm" object).
It is not clear from your message, but it would seem that you used fitp2
as the argument to dwtest. (In any case, this gives the error message
you quote?)
But fitp2 is neither
Hi,
I want to test for independence in my GLS model fitp2, but when I try to use the
dwtest function in the lmtest library, I get the error message "Error in
terms.default(formula) : no terms component".
The model and data set are below. Any suggestions would be really helpful!
Thanks a lot in ad
Hi Jim,
I did define it, although I guess I wasn't clear. The spell length is
essentially the interval of time between price changes. So in the data,
say a price starts at 3, and then 150 days later, the price changes to
4. The "spell length" is 150, the interval of time between the price
cha
I think the
merge()
function should be adequate for this task. Here is an example.
A <- data.frame(day=1:5, x=runif(5))
B <- data.frame(day=3:7, x=runif(5))
A
day x
1 1 0.9764534
2 2 0.9693998
3 3 0.1324933
4 4 0.8311153
5 5 0.3264465
B <- data.frame(day=3:8, x=run
You need to provide a definition of what the "spell length" is since I
am not an economist. Given that you have a list of prices, how do you
determine the spell length and then what do you do with the data in
each interval? This is what you would have to clarify, at from my
point of view, so that
I suspect you should be smoothing the series in a manner that
replaces zeros by some usually small larger number before
you start. Without more details on what you are trying to do, it
is impossible to know what is sensible. You are proposing to
leave all smoothing ("rolling"?) till later; why n
Here is one approach for using the average of each interval:
> # generate some test data; assume 1.0 is one degree
> min.5 <- 5 / 60 # portion of degree for 5 minutes
> n <- 100 # number of data points
> myData <- cbind(interval=seq(0, by=min.5, length=n), value=runif(n))
> # create breaks eve
Dear all,
I have gridded data at 5' (minutes) resolution, which I intend to coarsen to
0.5 degrees. How would I go about doing this in R? I've had a search online and
haven't found anything obvious, so any help would be gratefully received.
I'm assuming that there will be several 'coarsening'
Sorry, the last one should be:
ix <- match(B$DayOfYear, A$DayOfYear)
A[ix, "x"] <- A[ix, "x"] - B$x
Again we are assuming B's days are a subset of A's.
On Sat, Jul 26, 2008 at 6:08 PM, Gabor Grothendieck
<[EMAIL PROTECTED]> wrote:
> Here is a third solution.
>
> A[B$DayOfYear, "x"] <- A[B$DayOfY
Here is a third solution.
A[B$DayOfYear, "x"] <- A[B$DayOfYear, "x"] - B$x
Its assumes B's days are a subset of A's but if that's not the case then
you would need to intersect them first: ?intersect
On Sat, Jul 26, 2008 at 5:26 PM, <[EMAIL PROTECTED]> wrote:
> I have two vectos (list) that repr
Here is a second solution. This one uses sqldf instead of zoo:
library(zoo)
sqldf("select A.x - ifnull(B.x, 0) from A left join B using(DayOfYear)")
See
http://sqldf.googlecode.com
On Sat, Jul 26, 2008 at 5:26 PM, <[EMAIL PROTECTED]> wrote:
> I have two vectos (list) that represent a years of
Hi,
One option is:
?spsample
cheers,
Paul
Raphael Saldanha schreef:
Hi!
How can I make a spatial sample?
Can someone recommend theorical books and materials for this?
--
Raphael Saldanha
UFJF - Brazil
[[alternative HTML version deleted]]
_
The original example that you sent was in the long format:
> brkdn(intervals~country,jymint.df,num.desc=c("mean","median"))
Breakdown of intervals by country
Level mean median
au 0.01 0
br -0.07 1
cn -0.32 2
For the last statement we may prefer this
so it stays a zoo object:
> m <- merge(Az, Bz, fill = 0)
> m[,1] - m[,2]
12345
14290 30490 2219
On Sat, Jul 26, 2008 at 5:53 PM, Gabor Grothendieck
<[EMAIL PROTECTED]> wrote:
> Look at merge.zoo
>
>> library(zoo)
>> dput(A)
> st
Look at merge.zoo
> library(zoo)
> dput(A)
structure(list(DayOfYear = 1:5, x = c(1429L, 3952L, 3049L, 2844L,
2219L)), .Names = c("DayOfYear", "x"), class = "data.frame", row.names = c("1",
"2", "3", "4", "5"))
> B <- A[c(2,4),]
> Az <- zoo(A$x, A$DayOfYear)
> Bz <- zoo(B$x, B$DayOfYear)
> merge(Az
Hi!
How can I make a spatial sample?
Can someone recommend theorical books and materials for this?
--
Raphael Saldanha
UFJF - Brazil
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listi
Thanks everybody!
Using the package *sampling *, for another aproach:
> population
0-100 100-250 250+
Região 1 9 18 16
Região 233 25 27
Região 321 19 17
Região 425 22 19
Região 540 39 19
Região 677 45 29
> sample_design <
I have two vectos (list) that represent a years of data. Each "row" is
represented by the day of year and the quantity that was sold for that day. I
would like to form a new vector that is the difference between the two years of
data. A sample of A (and similarly B) looks like:
> A[1:5,]
Day
On 26-Jul-08 21:12:56, Raphael Saldanha wrote:
> Hi!
>
> I have a data.frame, like this one:
>> data
> 0-100 100-250 250+
> a 9 18 16
> b33 25 27
> c21 19 17
> d25 22 19
> e40 39 19
> f77 45 29
>
> If I request a sample of 2, I h
like this:
> x
0-100 100-250 250+
a 9 18 16
b33 25 27
c21 19 17
d25 22 19
e40 39 19
f77 45 29
> x[sample(nrow(x), 3),]
0-100 100-250 250+
e40 39 19
c21 19 17
a 9 18 16
> x[sample(nrow(x), 3),]
Hi!
I have a data.frame, like this one:
> data
0-100 100-250 250+
a 9 18 16
b33 25 27
c21 19 17
d25 22 19
e40 39 19
f77 45 29
If I request a sample of 2, I have the following:
> sample(data, 2)
0-100 250+
a 9 16
b33
Zheng Lu umich.edu> writes:
>
>
> Dear all:
>
> I have the following codes:
>
> Xdata<-c(2,3,8,9,10)
> Ydata<-1:5
> gap.plot(Xdata, Ydata,gap=c(5,6),gap.axis="x",type="o")
>
> However, the type='o' seems only work on the first part of gap plot, the
second half of the plot always just
> p
Is this what you want:
> df3 <- data.frame(id=c(3,2,1,4), age=c(40,50,60,50), dose1=c(1,2,1,2),
> dose2=c(2,1,2,1), dose4=c(3,3,3,3))
> df3
id age dose1 dose2 dose4
1 3 40 1 2 3
2 2 50 2 1 3
3 1 60 1 2 3
4 4 50 2 1 3
> new.df <- melt.data.
on 07/26/2008 10:16 AM ascentnet wrote:
I know there is a very simple answer to this question, but it eludes me. I
need to insert a vector into a matrix. So if I have a 2 column matrix with
5 rows, I need to insert in an additional vector so there is now 6 rows
without overwriting any of the da
I know there is a very simple answer to this question, but it eludes me. I
need to insert a vector into a matrix. So if I have a 2 column matrix with
5 rows, I need to insert in an additional vector so there is now 6 rows
without overwriting any of the data in the matrix already.
thanks,
Ben.
-
On Sat, Jul 26, 2008 at 9:35 AM, Peter Dalgaard
<[EMAIL PROTECTED]> wrote:
> Henrique Dallazuanna wrote:
>>
>> Try this:
>>
>> x <- data.frame(A=c(10,20), B = c("a", "b"), C = c(20,30))
>> x[sapply(x, is.numeric)]
>>
>>
>
> Yes, and read ?Extract to clear up the confusion between data$vol and
> dat
Dear R users,
is there a way to perform a competing risk model which can handle time
dependent covariates ?
my main covariate (additional treatment to patients) violates the proportional
hazards assumption, its effect being observed
after one year of treatment but not before (this
on 07/26/2008 10:37 AM [EMAIL PROTECTED] wrote:
I have ussed lm to generate a basic line correlation:
fit = lm(hours.of.sleep ~ ToSleep)
Note: From "Bayesian Computation with R", Jim Albert, p. 7
I understand the simple y = mx + b line that this fits the data to.
Now apparently I don't underst
Thanks for the information, and correcting my poorly written post. Applying the
patch solved the problem.
Joe Retzer
--- On Sat, 7/26/08, Prof Brian Ripley <[EMAIL PROTECTED]> wrote:
From: Prof Brian Ripley <[EMAIL PROTECTED]>
Subject: Re: [R] Thin frame line around R pdf output in LaTeX
To: "Jos
Hi Kevin,
>> Can anyone give me a short tutorial on the formula syntax? ... I am sorry
>> but I could not
>> glean this information from the help page on lm.
You can give yourself a very good tutorial by reading ?formula and Chapter
12 of
file://localhost/C:/Program%20Files/R/R-2.7.1pat/doc/ma
Henrique Dallazuanna wrote:
Try this:
x <- data.frame(A=c(10,20), B = c("a", "b"), C = c(20,30))
x[sapply(x, is.numeric)]
Yes, and read ?Extract to clear up the confusion between data$vol and
data[257] and data[[257]] (Section on "Recursive (list-like) objects:").
Also, ?Extract.data.frame
Hi Joseph,
For what it is worth (which might not be that much!), I have written
down step by step instructions on my website for getting 64 bit R
working under Leopard - it should be much different with Tiger:
http://www.matthewckeller.com/html/64_bit_r_on_mac.html. I think it'll
work but there ma
Simple illustration,
> df3 <- data.frame(id=c(3,2,1,4), age=c(40,50,60,50), dose1=c(1,2,1,2),
> dose2=c(2,1,2,1), dose4=c(3,3,3,3))> df3 id age dose1 dose2 dose41 3 40
> 1 2 32 2 50 2 1 33 1 60 1 2 34 4 50
> 2 1 3> melt.data.frame(df3,
I have ussed lm to generate a basic line correlation:
fit = lm(hours.of.sleep ~ ToSleep)
Note: From "Bayesian Computation with R", Jim Albert, p. 7
I understand the simple y = mx + b line that this fits the data to. Now
apparently I don't understand formulas. The documentation indicates that th
Dear R'rrs
I'm on Mac OS X Leopard 10.5.4 with R 2.7.1 Where exactly should I
place a .Rprofile to get site changes (there are lots of etc in
frameworks
and I can't get it right)?
Sincerely Fredrik
Fredrik Lundgren
[EMAIL PROTECTED]
Obs! Ny adress och mail
Engelb
HiI am using the boot function in boot package. I am facing a problem in
getting the values of bias and st.error in the output.
r<-36n<-40shape<-2theta11<-exp(1) # (=2.718282)theta21<-exp(.5) #(
=1.648721)m0<- function(Ti,Tj) #a function that generates the MLestimates{
loglik<-function(ti,t
Dear all:
I have the following codes:
Xdata<-c(2,3,8,9,10)
Ydata<-1:5
gap.plot(Xdata, Ydata,gap=c(5,6),gap.axis="x",type="o")
However, the type='o' seems only work on the first part of gap plot, the second
half of the plot always just points, you can not add lines on that part, any
help
Try this:
x <- data.frame(A=c(10,20), B = c("a", "b"), C = c(20,30))
x[sapply(x, is.numeric)]
On Sat, Jul 26, 2008 at 11:19 AM, Markus Mühlbacher <[EMAIL PROTECTED]> wrote:
> Hello,
>
> My question sounds simple, but as I am desperatly searchin for a solution I am
> asking you all. :)
>
> I try t
Hello,
My question sounds simple, but as I am desperatly searchin for a solution I am
asking you all. :)
I try to filter out all non-numeric columns of a data frame using a for loop
to go through all columns. My if clause looks like this:
for(j in 1:length(data)) {
...
Hi Jimsong,
If I understood your point, give a look at "adehabitat" and "grasp"
packages.
Almost for adehabitat there are a demo for you see its functionality.
Cheers,
miltinho astronauta
brazil
On 7/26/08, Jinsong Zhao <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Is there a package that could do res
Duncan Murdoch <[EMAIL PROTECTED]> writes:
> On 26/07/2008 4:44 AM, haani hanni wrote:
>> --- On Thu, 17/7/08, haani hanni <[EMAIL PROTECTED]> wrote:
>> From: haani hanni <[EMAIL PROTECTED]>
>> Subject: Fw: how i can install Rgraphviz in R2.7.1
>> To: R-help@r-project.org
>> Date: Thursday, 17 Jul
cindy Guo wrote:
Thank you, Brian and Mark,
I tried the win-builder on http://win-builder.r-project.org/. Is this what
you mean? I uploaded the source code, and I didn't get any email after
couple of hours. It should arrive after half an hour, as it is said on the
webpage. Do you know what can
Dear R-Users,
the problem I was facing it's solved. Actually, the code was ok from the
first time.
You define it as:
lw <- function(h, x, im)
{
peri1 <- per(x)
len <- length(x)
m <- len/im
peri <- peri1[2:(m+1)]
z <- c(1:m)
freq <- ((2*pi)/len) * z
result <- log(sum(f
> "CG" == Christophe Genolini <[EMAIL PROTECTED]>
> on Sat, 26 Jul 2008 12:12:12 +0200 writes:
CG> Martin Maechler <[EMAIL PROTECTED]> a écrit :
>>> "CG" == Christophe Genolini <[EMAIL PROTECTED]>
>>> on Tue, 22 Jul 2008 19:04:37 +0200 writes:
Dear R users,
is there a way, I mean a package, to perform a competing risk model which can
handle time dependent covariates ?
my main covariate (additional treatment to patients) appears not to follow the
proportional hazards assumption, its effect being observed after one year of
treatment
I made some experiments and I conclude that if I change the interval (e.g.
say c(-100,100)!!!) then the minimum value changes in respect to the
simulated data.
So, probably the problem lies in the "optimal" values of the interval?
On Sat, Jul 26, 2008 at 1:00 PM, Fotis Papailias <[EMAIL PROTECTE
you would basically change the statement as follows:
aggregate(x$Quantity, list(DayOfYear=x$DayOfYear, Category=x$Category), FUN=sum)
On Sat, Jul 26, 2008 at 2:30 AM, <[EMAIL PROTECTED]> wrote:
> Thank you this is exactly what I wanted.
>
> I was unaware of the 'aggregate' function.
>
> Now what
Hi,
thanks for your message.
You mean to rewrite the function like that:
lw <- function(d, x, im)
{
peri1 <- per(x)
len <- length(x)
m <- len/im
peri <- peri1[2:(m+1)]
z <- c(1:m)
freq <- ((2*pi)/len) * z
result <- log(sum(freq^(2*d-1)*peri))-(2*d)/m * sum(log(freq))
On 26/07/2008 7:40 AM, Fotis Papailias wrote:
Dear R-users,
I have sent another mail some hour ago about a matlab Code I was trying to
translate in R.
Actually I have found a simpler code originally written in S-PLUS for the
same function.
Author's page -> http://math.bu.edu/people/murad/method
Hi,
Is there a package that could do response surface analysis equivalent to
SAS RSREG procedure? Thanks!
Regards,
Jinsong
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-
Dear R-users,
I have sent another mail some hour ago about a matlab Code I was trying to
translate in R.
Actually I have found a simpler code originally written in S-PLUS for the
same function.
Author's page -> http://math.bu.edu/people/murad/methods/locwhitt/
===
On 26/07/2008 4:44 AM, haani hanni wrote:
--- On Thu, 17/7/08, haani hanni <[EMAIL PROTECTED]> wrote:
From: haani hanni <[EMAIL PROTECTED]>
Subject: Fw: how i can install Rgraphviz in R2.7.1
To: R-help@r-project.org
Date: Thursday, 17 July, 2008, 10:41 AM
--- On Tue, 15/7/08, haani hanni <[EM
Martin Maechler <[EMAIL PROTECTED]> a écrit :
"CG" == Christophe Genolini <[EMAIL PROTECTED]>
on Tue, 22 Jul 2008 19:04:37 +0200 writes:
CG> Prof Brian Ripley <[EMAIL PROTECTED]> a écrit :
>> On Tue, 22 Jul 2008, [EMAIL PROTECTED] wrote:
>>
>>> Hi the list (well, half of th
Hello Friends!!
I need a little help in a Text Windows in my Menu in TCL-TK.
I have created a Text Windows with this sentences:
require(tcltk)
tt <- tktoplevel()
txt <- tktext(tt,bg="white",font="courier")
tkgrid(txt)
tkinsert(txt,"end","Hello, world!")
On 26 Jul 2008, at 02:52, hadley wickham wrote:
On Fri, Jul 25, 2008 at 8:50 PM, hadley wickham
<[EMAIL PROTECTED]> wrote:
On Fri, Jul 25, 2008 at 9:49 AM, baptiste auguie
<[EMAIL PROTECTED]> wrote:
Dear list,
I'm trying to use the reshape package to perform a merging
operation on a
l
R-users
E-mail: r-help@r-project.org
Hi! R-users.
A simple object as below was created to see how gam() of
package "mgcv" and anova() work.
function()
{
library(mgcv)
set.seed(12)
nd <- 100
xx1 <- runif(nd, min=1, max=10)
xx1 <- sort(xx1)
yy <- sin(xx1)+rnorm(nd, mean=5, sd=5)
--- On Thu, 17/7/08, haani hanni <[EMAIL PROTECTED]> wrote:
From: haani hanni <[EMAIL PROTECTED]>
Subject: Fw: how i can install Rgraphviz in R2.7.1
To: R-help@r-project.org
Date: Thursday, 17 July, 2008, 10:41 AM
--- On Tue, 15/7/08, haani hanni <[EMAIL PROTECTED]> wrote:
From: haani hanni <
Oh...
No, I don't need to read the documentation again. I just need to wake up...
2008/7/25 Frank E Harrell Jr <[EMAIL PROTECTED]>
> David Hajage wrote:
>
>>
>>
>> 2008/7/25 Frank E Harrell Jr <[EMAIL PROTECTED] > [EMAIL PROTECTED]>>
>>
>>
>>David Hajage wrote:
>>
>>Hello R users,
>>
On Sat, 26 Jul 2008, laila khalfan wrote:
Hi
I am trying to find a parametric bootstrap confidence interval and when
I used the boot function I get zero bias and zero st.error? What could
be my mistake?
The way you simulated the 'parametric bootstrap'.
Thank you and take care.
Laila
> "jh" == jim holtman <[EMAIL PROTECTED]>
> on Fri, 25 Jul 2008 12:34:49 -0400 writes:
> "jh" == jim holtman <[EMAIL PROTECTED]>
> on Fri, 25 Jul 2008 12:34:49 -0400 writes:
jh> Does this do what you want:
>> x <- matrix(1:25,5)
>> x
jh> [,1] [,2] [,3
There is no 'R 2.7' (see the posting guide). Have you followed the advice
in the posting guide of using the latest (R-patched) version of R? I
believe that this has been fixed since 2.7.0.
Please note Mac-specific issues as such on the subject line, and
preferably ask them on the R-sig-mac l
On Fri, 25 Jul 2008, Nutter, Benjamin wrote:
data <- data.frame(Year=c(2000,2001,2002),
After the great help here I have a final problem (bug in R??)
with the background color. I would like to put my final drawing
on a dark background and thus I would like to use brigt colors
for axes etc. T
On Fri, 25 Jul 2008, cindy Guo wrote:
Thank you, Brian and Mark,
I tried the win-builder on http://win-builder.r-project.org/. Is this
what you mean? I uploaded the source code, and I didn't get any email
after couple of hours. It should arrive after half an hour, as it is said
on the webpage.
66 matches
Mail list logo