Others have shown how to do this, but a better approach may be to load your
.Rdata file into a new environment rather than the global environment, then you
can work with the environment (and all the objects in it) using lapply, or
loops with [[]] instead of fighting with get and assign.
Somethi
On 11-07-30 5:55 PM, Axel Urbiz wrote:
Dear List,
I'd like to extend the glmnet package to account for one additional
distribution: the Tweedie (compound of Poisson and Gamma). Could you please
point me on how should I do this?
Your question is quite ambiguous. Are you asking about the scienc
Hi Michael, David,
I agree it was an error on my part. It should have been plnorm only. I
should have looked more closely. Thanks for the help!
Best,
Vishal
On Sat, Jul 30, 2011 at 5:18 PM, R. Michael Weylandt <
michael.weyla...@gmail.com> wrote:
> The qDIST() functions are the inverse of the
On Jul 30, 2011, at 6:05 PM, Eduardo M. A. M.Mendes wrote:
Hi Joshua
Many thanks.
library(Hmisc);
plot.xts(x,major.ticks="weeks",major.format="%b/%d %H:%M:%S");
minor.tick(nx=7);
The above commands give me almost what I need. I just need to
figure out
how to split the labels in two lin
Dear list,
I have two questions regarding grid.symbols() in the grImport package.
This package allows you to import a vector graphic in R, and
grid.symbols() can be used to plot the resulting glyph at arbitrary
locations in a grid viewport.
I have tried the code in the grImport vignette, which is
Hi Joshua
Many thanks.
>library(Hmisc);
> plot.xts(x,major.ticks="weeks",major.format="%b/%d %H:%M:%S");
> minor.tick(nx=7);
The above commands give me almost what I need. I just need to figure out
how to split the labels in two lines (without using ggplot2)
Cheers
Ed
-Original Message
Dear List,
I'd like to extend the glmnet package to account for one additional
distribution: the Tweedie (compound of Poisson and Gamma). Could you please
point me on how should I do this?
Thanks for any help,
Axel.
[[alternative HTML version deleted]]
__
Thanks for your quick response on this issue John!
Yes, in my real dataset I have many predictors and more observations
than in this example. I've started to remove one predictor at the time
until this one was found to be causing the problem.
Thanks again!
Lars.
On Sat, Jul 30, 2011 at 5:33 PM,
Dear Lars,
The problem is the ":" in the levels of var2, which confuses effect() about
the structure of the model, since a colon indicates interaction. Try, e.g.,
removing the colons:
var2 <- as.factor(c("B=500", "B=500", "B=500", "B=500", "B=500", "B=500",
"B=500", "B=500",
"B
On Jul 30, 2011, at 5:04 PM, Vishal Thapar wrote:
Hi All,
Did anyone else have a problem like this? I am sorry if its a small
issue, I
seem to not understand what to do to get rid of this error.
I hope that everyone else has this problem. You do not seem to
understand the q functions.
On 30.07.2011 21:58, Jeffrey Joh wrote:
Sorry about the last message. I forgot to turn the HTML off.
I would like to reorder a table by column A,
df2 <- df[order(df$A),]
then fill column B with the values above it.
for (i in 1:nrow(df2)) {
if (is.na(df2$B[i]) | df2$B[i] == "NULL") df2$
The qDIST() functions are the inverse of the pDIST() functions, that is to
say, the inverse CDFs of whatever distribution you are interested in.
Your code is asking it to plot values of the inverse CDF from x from 4000 to
9000, which are impossible values. (I hope the reason for this is evident t
Hi All,
Did anyone else have a problem like this? I am sorry if its a small issue, I
seem to not understand what to do to get rid of this error.
> Sigma
[1] 0.1939025
> MuRest
[1] 8.512772
> TauZero
[1] 0.1
> curve(qlnorm(x,-TauZero+MuRest, Sigma,lower.tail=F), xlim=c(4000,9000),
ylim=c(0,.99),xl
On 11-07-30 3:56 PM, Megh Dal wrote:
Dear all, I am looking for some procedure to apply 'ifelse' condition on
function. I have created an alternative to lapply() function with exactly same
set of arguments named lapply1(), however with different internal codes.
Therefore I want something like,
Dear GIS people
What is the best way of implemeting spatial data interpolation (from large to
small grids)-especially for dummies. I searched the internet and could not get
concrete answer. Here is an example with simulated data.
#Example of spatial data interpolation
require(utils)
#I need to
ok. Here's an example:
R version 2.11.1
effects_2.0-10
var1 <- c(25631.9392, 2521.2590, 6656.6516, 1362.5997, 6369.9818,
27253.4223, 2073.1909, 9959.3792,
3318.2500, 15323.8103, 11583.8717, 3054.5558, 625.6597,
2500., 11996.2271)
var2 <- as.factor(c("B:=500", "B:=500", "B:=5
I am assuming that what you say is NULL is really a character string
"NULL", so try this:
> x
AB
1 2 54
2 5
3 8 78
4 4 NULL
5 3 26
6 9 NULL
> str(x)
'data.frame': 6 obs. of 2 variables:
$ A: int 2 5 8 4 3 9
$ B: Factor w/ 4 levels "26","54","78",..: 2 NA 3 4 1 4
> dput(x)
struct
You can use ifelse() if you want...
x <- 1:10
ifelse(x < 5, mean(x), length(x))
Although I do not really see how you are hoping to improve on if
(condition) lapply1() else lapply().
Josh
On Sat, Jul 30, 2011 at 12:56 PM, Megh Dal wrote:
> Dear all, I am looking for some procedure to apply 'ife
Sorry about the last message. I forgot to turn the HTML off.
I would like to reorder a table by column A, then fill column B with the values
above it. For example:
A B
2 54
5 NA
8 78
4 NULL
3 26
9 NULL
First sort by column A:
A B
2 54
3 26
4 NULL
5 NA
8 78
9 NULL
Dear all, I am looking for some procedure to apply 'ifelse' condition on
function. I have created an alternative to lapply() function with exactly same
set of arguments named lapply1(), however with different internal codes.
Therefore I want something like, if (some condition) then call lapply1(
Not with a description like that.
You need to make a reproducible example. Try using head () or subset to make a
smaller data set. Provide the data (using e.g. dput()). Provide the commands
that trigger the errors. Who knows... you might even see the issue yourself
then.
Dear Lars,
There's not nearly enough information here to know what's wrong. I can guess
(but shouldn't have to) that the model glm.sev1 is a generalized linear
model of some sort, probably fit by glm(). At a minimum, it would help to
know what command you used to fit the model, the history of comm
Dear List,
Several times I use this package I get the error message shown below.
When I work out simple examples, it turns out to be fine, but when
working with real and moderate size data sets I always get the same
error.
Do you know what could be the cause of the problem?
Error in apply(mod.m
Which package is gofstat in? can you show us your data, or some details about
your data?
Note that the KS test (and all goodness of fit tests) are rule out tests, they
can show that the data is unlikely to come from a distribution, but can never
prove that it does come from a distribution.
--
What makes you think that the p-value of 1 is more accurate than the p-value of
0? The K-S test will show significance for very small differences in
distributions when the sample size is big enough.
Also, it is not clear that you are using it correctly. Generally you would
just give the raw d
I am looking for introductory/published papers on spectral analysis\Frequency
domain analysis for both univariate and multivariate Time Series data that use
R-preferabily climate or economic data. I have some but most of them are not
for begginers.
Peter Maclean
Department of Economics
UDSM
On Jul 30, 2011, at 10:39 AM, selwyn quan wrote:
On Sat, 30 Jul 2011, Rolf Turner wrote:
On 29/07/11 19:57, Martin Maechler wrote:
but *also* see the *workaround* for the bug that has been on
R's ?pdf help page for years []
--> search for "q" (including the quotes).
Why oh wh
Sorry that X in the first equation should be Ɛ
--
View this message in context:
http://r.789695.n4.nabble.com/About-AR-1-GJR-GARCH-1-1-MODEL-tp3706508p3706512.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing
On Sat, 30 Jul 2011, Rolf Turner wrote:
On 29/07/11 19:57, Martin Maechler wrote:
but *also* see the *workaround* for the bug that has been on
R's ?pdf help page for years []
--> search for "q" (including the quotes).
Why oh why oh why ... are people always thinkg of bugs in R
sorry to bother all,
I am recently doing a topic about spillover effect between two markets. And
I want to use AR(1)-GJR-GARCH(1,1)-M Model. I find that rgarch package has
functions for univariate GARCH model, including GJR.
My GJR model is
http://r.789695.n4.nabble.com/file/n3706508/formula.jpg
Hi Eduardo,
I'm not too familiar with plot.xts, but this answers 2/3 of your requests.
R> plot(x, major.ticks="weeks", major.format="%b %d")
plot.zoo is quite a bit more flexible and has a lot of examples in
?plot.zoo. Combining plot.zoo with endpoints should be able to give
you what you want.
On Jul 30, 2011, at 2:25 AM, Jeffrey Joh wrote:
I would like to reorder a two-column table by column A, then fill
column B with the values above it. For example: Original:A B2
545 NA8 784 NULL3 269 NULL First sort by column A:A
B2 543 264 NULL5 NA8 7
This doesn't sound like it would be too hard to do at all, but I really
can't read your table: could you resend the table and the desired
intermediate and final steps but format them more legibly?
Something like:
A B
2 545
NA8 784
NULL 3
269 NULL
assuming that is where you are starting.
I'm not
On Jul 30, 2011, at 5:13 AM, Dennis Murphy wrote:
Hi:
Try this:
set.seed(266)
dfm <- data.frame(c1 = sample(1:5, 10, replace = TRUE),
e1 = sample(1:3, 10, replace = TRUE),
c2 = sample(1:5, 10, replace = TRUE),
e2 = sample(1:3, 10, replace = T
Dear R-users
I am new to R and struggling not to bother the list with silly questions.
I read the documentation on xts and searched for some examples over the
internet on how to use plot.xts.
The xts object is as follows
dataxts : An 'xts' object from 2010-06-27 to 2010-08-05 cont
Great, that works... even if I don't really understand the fuzz trick...
But now at least I've got all the material to take a deeper look into this
subject. So don't worry, no emergency at all for the no-workaround fixing.
I tested with HAC, the change seems to occur a bit later, around point 150
# plyr
plyr is a set of tools for a common set of problems: you need to
__split__ up a big data structure into homogeneous pieces, __apply__ a
function to each piece and then __combine__ all the results back
together. For example, you might want to:
* fit the same model each patient subsets of
Am Freitag, den 29.07.2011, 15:28 +0200 schrieb Paul Menzel:
> wanting to compare different implementations of a solution I want to
> script it to iterate over the different implementations. Is there a way
> to do this in the R shell/command line?
>
> $ more /tmp/iterf.r
> f1 <- f
At 09:03 29/07/2011, gaiarrido wrote:
Hi,
I´m trying to move to ubuntu at all, but I don´t like R in Ubuntu because it
runs in the terminal, so i can´t access directly to some options R gots in
Windows.
Mario, it would help if you told us which options
from the Windows GUI you are missing.
Thank you Dennis and Peter.
On Fri, Jul 29, 2011 at 1:59 PM, Dennis Murphy wrote:
> Hi:
>
> To add to Peter Dalgaard's comments, a look at head(ret) and
> head(returns) would also have clued you in:
>
> > head(ret, 1)
> GOOG.OpenGOOG.High GOOG.Low GOOG.Close GOOG.Volume
Hi,
I want to use rbpspline {SpatialExtremes}.
My predictor variables have multiple dimensions,
In R-help it says that knots will be a vector givint the coordinates of the
knots.
However, my knots should have multiple dimension.
How can I generate knots for multidimensional case?
Thanks in ad
But, if I use coxph() function with gaussian frailty effect and I extract the
residuals from this model, it's correct?
I noticed that I obtained different estimates for same coefficients (very
small).
--
View this message in context:
http://r.789695.n4.nabble.com/coxme-and-random-factors-tp32366
Thanks!
On Wed, Jul 27, 2011 at 7:16 PM, Uwe Ligges-3 [via R] <
ml-node+3699381-219890429-254...@n4.nabble.com> wrote:
>
>
> On 25.07.2011 19:42, eilunedpearce wrote:
>
> > Hi,
> >
> > I'm trying to install CAIC directly into the newest version of R using
> the
> > code on the R-Forge CAIC websit
hi, R users
here is my problem, i want to make a clusterring tree, than do the searching
through the tree using branch and bound method.
the code to make the tree, but i dont know how to do the searching part.
thanks for any helping...
d <- dist(data, method = "euclidean")
h1 <- hclust(d, met
Wir sind bis am 20. August in den Ferien und werden keine e-mails beantworten.
Bei dringenden Fällen melden Sie sich bei Stefanie von Felten
steffi.vonfel...@oikostat.ch
We are on vacation until 20. August. In urgent cases, please contact Stefanie
von Felten steffi.vonfel...@oikostat.ch
__
On Sat, 30 Jul 2011, Michel Lutz wrote:
Thanks a lot for your answer.
You're right, I need to continue reading some papers to define a relevant
testing strategy.
Thanks to your package, I think I've got all what I need to proceed on
the exception of using 'breakpoints' with my data !
I'v
Hi, I used a ks-function of another library (kstwo() of numerical recipes, a
mathematics book) to test it for myself and the same happens there - I
cannot understand why this observation happens? I hope someone can
'enlighten' me.
--
View this message in context:
http://r.789695.n4.nabble.com/Pro
Hi:
Try this:
set.seed(266)
dfm <- data.frame(c1 = sample(1:5, 10, replace = TRUE),
e1 = sample(1:3, 10, replace = TRUE),
c2 = sample(1:5, 10, replace = TRUE),
e2 = sample(1:3, 10, replace = TRUE),
c3 = sample(1:5, 10, replac
Just checked. To get lapply to work for the both functions, I have to
convert the matrix M into a dataframe. Trying it with apply for the
matrix works perfectly fine. The missing x was the problem
So here my improved code.
require(Deducer)#Package for perm.t.test
c(rep("A", 5), rep("B", 5
I would like to reorder a two-column table by column A, then fill column B with
the values above it. For example: Original:A B2 545 NA8 784 NULL3
269 NULL First sort by column A:A B2 543 264 NULL5 NA8
789 NULL Then replace null/na values in column B
test<-by(vol,x, vol.exp)
Error in tapply(1L:45L, list(DBH = 80:200), function (x) :
arguments must have same length
*Ben *
On Sat, Jul 30, 2011 at 10:16 AM, Benjamin Caldwell wrote:
> Or maybe that function should look more like
>
> vol.exp<-function(x) {
> V<-((coefficient1*(x)^exponent1)
Or maybe that function should look more like
vol.exp<-function(x) {
V<-((coefficient1*(x)^exponent1)+(coefficient2*(x)^exponent2)+constant)
V
}
?
*Ben *
On Sat, Jul 30, 2011 at 10:06 AM, Benjamin Caldwell wrote:
> Hello,
>
> I'm just trying to wrap my head around the syntax for creating loop
Hello,
I'm just trying to wrap my head around the syntax for creating loops,
functions in R. I have an array of values from a .csv. Looks something like
header<-c(species,coefficient1, exponent1, coefficient2, exponent2,
constant)
with a species name for the first column, and values for coeffici
Thanks a lot for your answer.
You're right, I need to continue reading some papers to define a relevant
testing strategy.
Thanks to your package, I think I've got all what I need to proceed on
the exception of using 'breakpoints' with my data !
I've tested all possibilities (dummy or not) an
54 matches
Mail list logo