Untested and with the presumption that you have the appropriate package loaded:
sapply(1:15, function(x) qr(y ~ ., df[-grep(paste0(“x”,i)]) )
> On Oct 30, 2014, at 11:14 PM, Preetam Pal wrote:
>
> Hi,
>
> I am doing quantile regression of y on a set of 15 explanatory variables x1,
> x2,x
Hi,
I am doing quantile regression of y on a set of 15 explanatory variables x1,
x2,x15. I want to run 15 regression models where in the i-th model, y would
be regressed on all x variables except x-i. Then I would compare the results.
At this point, I donot know how to create the 15 data se
Sounds like homework. See the Posting Guide.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#..
Hi,
I have 15 variables x1, x2, , x15 and I want to create 15 data sets where
the i-th data set D-i will be contain all variables except the variable, x-i,
for i in 1 to 15. It would be great if someone can help me out with this. I
have had very little exposure to R or general coding befor
Your example is not reproducible. For example you don't indicate what lat and
lon values you are using.
Nor do you specify what time zone you are working in. These are all crucial to
obtain consistency.
I have no experience using the insol package, and had no luck trying it just
now, but the ma
Dea R users,
In the package insol
I was trying to calculate sunzenith angle. I am using two different date
formats as shown below and both give me different results. Comapring the
results from NOAA website the one below is correct.
xx<-JD(ISOdate(2010,10,1,11))
sv=sunvector(xx,lat,lon,tmz)
zenith
On Fri, 31 Oct 2014 07:19:01 AM Jim Lemon wrote:
> On Wed, 29 Oct 2014 05:12:19 PM CJ Davies wrote:
> > I am trying to show that the red line ('yaw') in the upper of the two
> > plots here;
> >
> > http://i.imgur.com/N4Xxb4f.png
> >
> > varies more within the pink sections ('transition 1') than i
Or do all the subsetting in one pass - [ will use a hashmap.
Hadley
On Thu, Oct 30, 2014 at 12:05 PM, William Dunlap wrote:
> You can try using an environment instead of a list.
>
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com
>
>
> On Thu, Oct 30, 2014 at 10:02 AM, Thomas Nyberg wrote:
>>
I have R version 2.15.0 installed in /usr/local/bin, and this is the
default; in other words when I type which R this is the path I get.
I also have installed R into/usr/local/R-3.1.1/. I used ./configure
and then make to install this version. After make, I get the following
error messages:
On Wed, 29 Oct 2014 05:12:19 PM CJ Davies wrote:
> I am trying to show that the red line ('yaw') in the upper of the two
> plots here;
>
> http://i.imgur.com/N4Xxb4f.png
>
> varies more within the pink sections ('transition 1') than in the light
> blue sections ('real').
>
> I tried to use var.t
Hi,
You have to transform it to a Data Frame.
Try:
files <- stack(rasterlist)
filesdf<-as.data.frame(files)
pca <- princomp(formula = ~., data = filesdf, cor = TRUE,
na.action=na.exclude)
hope it helps
Gustavo
Em quinta-feira, 30 de outubro de 2014 14h38min56s UTC-2, John Wasige
escreveu
(CCing the list because I definitely think it would be useful to have
this in the archives.)
Thanks so much! It's clear that I'm going to need to read this email
plus references quite a few times before things sink in. I guess I'll
have to change my point of view entirely for this language. I
You can try using an environment instead of a list.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Thu, Oct 30, 2014 at 10:02 AM, Thomas Nyberg wrote:
> Thanks to all for the help everyone! For the moment I'll stick with Bill's
> solution, but I'll check out the other recommendations as well.
Thanks to all for the help everyone! For the moment I'll stick with
Bill's solution, but I'll check out the other recommendations as well.
Regarding the issue of slow looks ups for lists, are there any hash map
implementations in R that are faster? I like using fairly simple logic
and data str
On 30/10/2014 16:03, Kuma Raj wrote:
How can I merge data frame df and "tem" shown below by filling the
head of "tem" with missing values?
does
c(rep(NA, nrow(df) - length(tem)), tem)
help?
a<- rnorm(1825, 20)
b<- rnorm(1825, 30)
date<-seq(as.Date("2000/1/1"), by = "day", length.out =
Hi everyone,
I've relatively new to R, and i'm trying to use it to perform a Principal
Components analysis (PCA)
I've done this using WEKA previously, and now i'm trying to do so using R's
prcomp and princomp (both options would work for me).
One problem i've found is that while WEKA PCA allows u
Hello community, I need help on how I can perform PCA on stacked raster
(multiple bands/ layers) in R. Does any body have an idea or script? Thanks
John
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz
Bill beat me to it, I was just about to post the same thing. The R
split version is still slower than python on my system, but the times
are now on the same order of magnitude, about a 10th of a second in
both cases.
You can also speed up the set-up part by sampling all at once instead
of repeated
How can I merge data frame df and "tem" shown below by filling the
head of "tem" with missing values?
a<- rnorm(1825, 20)
b<- rnorm(1825, 30)
date<-seq(as.Date("2000/1/1"), by = "day", length.out = 1825)
df<-data.frame(date,a,b)
tem<- rpois(1095, lambda=21)
Thanks
Repeatedly extending vectors takes a lot of time. You can do what you want with
d2 <- split(values, factor(numbers, levels=unique(numbers)))
If you would like the labels on d2 to be in numeric order then you can
simplify that to
d3 <- split(values, numbers)
Bill Dunlap
TIBCO Software
wdunlap
Look at sqldf or data.table packages. Lists are slow for lookup and not
particularly efficient with memory. numeric indexing into matrices or data
frames is more typical in R, and the above mentioned packages support indexing
to speed up lookups. Also, carefully consider whether you can program
Hi,
perhaps pre-generating the list before processing would speed it up
significantly. Though it may still be slower than python.
e.g. try something like:
d = as.list(rep(NA,length(numbers)))
rather than:
d = list()
Olivier.
On Thu, 30 Oct
2014 11:17:59 -0400 Thomas Nyberg wrote:
> Hello,
Hello community, I need help on how I can perform PCA on stacked raster
(multiple bands/ layers) in R. Does any body have an idea or script? Thanks
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/m
I started using RForcecom package to extract data from SalesForce.
It works very well for data sets with ~< 100K records, however
for a data set with ~400K records it becomes VERY SLOW
and export takes ~14h.
For comparison exporting the same table as csv using "report export" in
SalesForce
takes a
Don't know the answer, partly because you have not shown enough of your code.
The reason small, reproducible examples are specified in the footer and Posting
Guide is to avoid this problem.
AFAIK all of the parallel processing libraries in R re-use the child processes,
so garbage collection coul
Hello,
I want to do the following: Given a set of (number, value) pairs, I want
to create a list l so that l[[toString(number)]] returns the vector of
values associated to that number. It is hundreds of times slower than
the equivalent that I would write in python. I'm pretty new to R so I
be
Dear all,
This is bargraph.CI (sciplot package) qstn. How do you draw the bargraph while
subsetting, rather than doing a series of subsets. there is a subset function
within bargraph.CI, how is it implemented?
Any advice, Thanks
On Thursday, October 30, 2014 1:52 AM, Matthias Weber
wrote:
Hi Jim,
the graph looks at the moment nearly perfect. I have one last question.
How can I change the scaling of the x-axis. At the moment i see the values at
0,20,40,60,80,100.
My wish is, that the x-axis looks like the abline, so the scaling for the
x-axis should be at 0,25,50,75,100.
Thanks
The multcompView has some useful features but I'm sure this isn't
intentional. Excuse the size. This is about the smallest
reproducible example I can do:
require("multcompView")
> mm <- structure(list(TempNom = structure(c(1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
On Thu, 30 Oct 2014 09:25:53 AM Matthias Weber wrote:
> Hi Jim,
>
> the graph looks at the moment nearly perfect. I have one last
question.
> How can I change the scaling of the x-axis. At the moment i see the
values
> at 0,20,40,60,80,100.
>
> My wish is, that the x-axis looks like the abline,
30 matches
Mail list logo