Displaying 20 results from an estimated 2000 matches similar to: "Summing data based on certain conditions"
2004 Aug 21
3
Puzzled at lm() and time-series
I tried toy problems and there doesn't seem to be a basic problem
between lm() and ts objects:
X = data.frame(x=c(1,2,7,9), y=c(7,2,3,1))
lm(y ~ x, X)
X <- lapply(X, function(x) ts(x, frequency=12, start=c(1994,7)))
lm(y ~ x, X)
and this works fine - whether you do an lm() before or after making ts
objects, it's okay.
But I have a situation where things aren't okay.
2007 Dec 08
0
help for segmented package
Hi,
I am trying to find m breakpoints of a linear regression model. I
used the segmented package. It works fine for small number of
predicators and breakpoints.(3 r.v. 3 points). However, my model has
14 variables it even would not work even for just one breakpoints!.
The error message is always estimated breakpoints are out of range.
Since my problem is time related problem. So I
2011 May 16
2
wireframe advice - with reproducible code
Dear List,
i am trying to produce a 3d plot using wireframe using the code:
wireframe(Residuals_FD ~ Elevation * Temperature, data = data2, scales = list(arrows = FALSE), drape = TRUE, colorkey = TRUE)
As you can see when the code (using the data below) is run the plot area is set-up correctly but the actual surface is missing?
Any help would be greatly appreciated.
Chris
#data
Elevation
2011 Oct 29
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On Sat, 2011-10-29 at 15:16 -0500, Hal Finkel wrote:
> On Sat, 2011-10-29 at 14:02 -0500, Hal Finkel wrote:
> > On Sat, 2011-10-29 at 12:30 -0500, Hal Finkel wrote:
> > > Ralf, et al.,
> > >
> > > Attached is the latest version of my autovectorization patch. llvmdev
> > > has been CC'd (as had been suggested to me); this e-mail contains
> >
2010 Jan 04
1
log-normal overlay
Hello,
Using the following lines of code, I created the following graph:
2010 Jan 04
1
log normal overlay
Hello,
Using the following lines of code, I created the following graph:
2011 Oct 29
4
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On Sat, 2011-10-29 at 14:02 -0500, Hal Finkel wrote:
> On Sat, 2011-10-29 at 12:30 -0500, Hal Finkel wrote:
> > Ralf, et al.,
> >
> > Attached is the latest version of my autovectorization patch. llvmdev
> > has been CC'd (as had been suggested to me); this e-mail contains
> > additional benchmark results.
> >
> > First, these are preliminary
2011 Oct 29
4
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
Ralf, et al.,
Attached is the latest version of my autovectorization patch. llvmdev
has been CC'd (as had been suggested to me); this e-mail contains
additional benchmark results.
First, these are preliminary results because I did not do the things
necessary to make them real (explicitly quiet the machine, bind the
processes to one cpu, etc.). But they should be good enough for
discussion.
2011 Oct 29
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On Sat, 2011-10-29 at 12:30 -0500, Hal Finkel wrote:
> Ralf, et al.,
>
> Attached is the latest version of my autovectorization patch. llvmdev
> has been CC'd (as had been suggested to me); this e-mail contains
> additional benchmark results.
>
> First, these are preliminary results because I did not do the things
> necessary to make them real (explicitly quiet the
2006 Nov 22
1
how to merge these dataframes
Hi,
Having 3 dataframes with different row numbers, but equal column names
(see below) I want to merge them by Var1 so I've tried:
merge(j1,j2,j3,by="Var1")
merge(j,j1,j2,by=names("Var1"))
But always got the same message:
Erro en fix.by(by.x, x) : 'by' must specify column(s) as numbers, names
or logical
What I'm doing wrong?
Thanks,
Antonio
j1
2006 Oct 28
2
subsetting, aggregating and zoo
Hi,
Having an zoo object I can subset it to obtain the days where I have the
values within some range:
is.zoo(z)
TRUE
subset(z[,1], z[,1]>=5 & z[,1]<= 10) #Yields: Year(day)
1988(13) 1988(14) 1988(16) 1988(20) 1988(21) 1988(22) 1988(25)
1988(26)
7.973946 9.933518 7.978227 7.512960 6.641862 5.667780 5.721358
6.863729
1988(27) 1988(28) 1988(29) 1988(30) 1988(32)
2010 Jun 01
1
arrange data
Hi r-users,
I have a data below but I would like to rearrange my data so that it will be in the following format: year, month, day, rain. I also would like the data to be arranged so that it will be continues for example year 1939 it will go from january 1 to december 31 and continue with year 1940 from january 1st to 31st December and so on. What I have now is all january for all the years
2017 Oct 13
0
How to define proper breaks in RFM analysis
Hi
Your statement about attaching data is problematic. We cannot do much with it. Instead use output from dput(yourdata) to show us what exactly your data look like.
We also do not know how do you want to split your data. It would be nice if you can show also what should be the bins with respective data. Unless you provide this information you probably would not get any sensible answer.
Cheers
2006 Nov 23
1
how to loop this?
Hi,
I have the next procedure:
t1<-data.frame(table(substr(names(subset(lasker[[1]], lasker[[1]] >=
4)), 1, 7)))
t1[1:5,]
Var1 Freq
1 1988-02 3
2 1988-03 1
3 1988-04 1
4 1988-05 2
5 1988-06 3
How to make a new list?, dataframe? having 189 elements in the 'lasker'
list:
> str(lasker[[1]])
'table' int [, 1:1274] 1 1 3 2 1 5 4 1 1 4 ...
-
2006 Nov 22
3
dataframe manipulation
Hi,
Having a dataframe 'l1' (dput output is below):
>dim(l1)
1274 2
>l1[1:12,]
Var1 Freq
1 1988-01-13 1
2 1988-01-16 1
3 1988-01-20 3
4 1988-01-25 2
5 1988-01-30 1
6 1988-02-01 5
7 1988-02-08 4
8 1988-02-14 1
9 1988-02-16 1
10 1988-02-18 4
11 1988-02-24 2
12 1988-03-04 1
I want to extract the times
2012 Feb 14
1
cumsum function to determine plankton phenology
Apologies for the empty email earlier!
I have species abundance data sampled at a weekly frequency or
sometimes monthly depending on the year.
The goal is to identify the dates in an annual cycle in which the
cumulative abundance of a species reaches some threshold.
Here's an example of the data for 1 species over an annual period:
"mc_pheno" is the object created from this data:
2009 Jun 03
1
insert and count missing data
Hi R-users,
I have missing data for the month. My question is how do I insert the missing month and fill up the cell with 'na' for the rain amount? Then I would like to count the percentage of missing data.
No Year month rain
1398 1985 10 104.2
1399 1985 11 138.0
1400 1985 12 120.4
1401 1986 1 12.6
1402 1986 2 19.4
1403 1986 3 1.0
1404 1986 4 58.8
2006 Nov 26
1
adding elemens to a list
Hi,
I have a list of 20 elements, each of them of variable length and with a
structure like this:
lasker[[1]][1:10,]
Var1 Freq
1 1988-02 3
2 1988-03 1
3 1988-04 1
4 1988-05 2
5 1988-06 3
6 1988-07 1
7 1988-08 1
8 1988-09 1
9 1989-03 1
10 1989-04 1
How do I can insert in this list:
1988-01 0
1988-10 0
1988-11 0
1988-12 0
1989-01 0
2010 Feb 16
2
Error of Stepwise Regression with number of rows in use has changed: remove missing values?
Howdy, R Grues
I have enjoyed R, but I cannot solve one problem easily. Please help my problem.
When I tried the R script, I got the following Error. This error
results from input data file exported through a Excel spreadsheet
software.
Error in step(lm(pop.rate ~ as.numeric(year) + as.factor(policy) +
as.numeric(nation.grant) + ?:
??number of rows in use has changed: remove missing values?
2017 Oct 13
2
How to define proper breaks in RFM analysis
Hey,
i want to define 3 ideal breaks (bin) for each variable one of those
variables is attached in the previous email,
i don't want to consider quartile method because quartile is not working
ideally for that data set because data distribution is non normal.
so i want you to suggest another method so that i can define 3 breaks with
the ideal interval for Recency, frequency and monetary to