similar to: how to construct a time series

Displaying 20 results from an estimated 10000 matches similar to: "how to construct a time series"

2010 Apr 26
5
data frame
Dear list, I have a big data frame which looks like this: variable YEAR VAR EC01 2006 100 EC01 2007 200 EC02 2006 500 EC02 2007 450 PROD
2010 May 12
8
function
Dear list, I'm trying to implement the following function, but what I get is an error message and I don't understand where is the error: #outliers'identification: iqr=lapply(bb,function(){ inner_fencesl=quantile(x,0.25)-1.5*IQR(x) inner_fencesh=quantile(x,0.75)+1.5*IQR(x) outer_fencesl=quantile(x,0.25)-3*IQR(x) outer_fencesh=quantile(x,0.75)+3*IQR(x)}) where bb is a dataframe
2008 Aug 18
2
matrix row product and cumulative product
I spent a lot of time searching and came up empty handed on the following query. Is there an equivalent to rowSums that does product or cumulative product and avoids use of apply or looping? I found a rowProd in a package but it was a convenience function for apply. As part of a likelihood calculation called from optim, I?m computing products and cumulative products of rows of matrices with
2010 Jul 01
2
Sweave function
Dear list, I have a question about the interaction between R code and Latex language trough the Sweave function in the package "utils". What I'm trying to do is to write a report. Contrary to the examples shown in the Sweave Manual in which table already constructed by R are "exported" on Latex files, what I would like to do is to build a table in which I combine text and
2010 Mar 27
7
large dataset
Hi I have a question, as im not able to import a csv file which contains a big dataset(100.000 records) someone knows how many records R can handle without giving problems? What im facing when i try to import the file is that R generates more than 100.000 records and is very slow... thanks a lot!!!
2010 Jun 18
3
inverse function of melt
Dear list, I'm looking for an inverse function of melt(which is in package reshape).Namely, I had a data frame like this (Table1) YEAR VAR1 VAR2 VAR3 1995 7 3 45 1996 5 6 32 1997 6 10 15 I transformed my data by using the melt function and my data was reshaped in the following format: (Table2) YEAR variable
2010 May 06
5
frequency
Dear list, Im trying to do the following operation but im not able to do it This is my table: 1 2 3 1 0 7 4 2 0 2 0 3 0 1 3 4 0 3 4 what i would like to do is divide each row values with the corresponding column' sum,namely: 1 2 3 1 0 0.54 0.36 2 0 0.15 0 3 0 0.08
2009 Sep 16
2
Generalized cumsum?
Is there anything like cumsum and cumprod but which allows you to apply an arbitrary function instead of sum and product? In other words, I want a function cumfunc(x, f) that returns a vector, so that for all n up to the length of x cumapply(x,f)[n] = f(x[1:n]) This would give cumsum and cumprod as special cases when f=sum or f=prod. I could write such a function, but I can't see
2010 Jul 09
2
split with list
Dear List I would like to ask you something concenting a better print of the R output: I have a bit data frame which has the following structure: CFISCALE RAGSOCB ANNO VAR1 VAR2......... 9853312 astra 2005 6 45 9853312 astra 2006 78 45
2010 May 05
3
concatenate values of two columns
Dear list, I'm trying to concatenate the values of two columns but im not able to do it: i have a dataframe with the following two columns: X VAR1 VAR2 1 2 2 1 3 2 4 3 5 4 6 4 what i would like to
2010 May 07
3
for loop
Dear list, in the following loop im generating objects of type table. What I would like to do is to put all those objects together in a list (that i called cc).I did this but the result is not what i espect to get: cc=list() d=1 for (i in data) { cc=list(cc,assign(paste("n",d,sep=""),table(i,subsample$vD31NADD))) d=d+1} I know that this won't work properly:
2011 May 07
3
help!! warning:only the first element has been used
i simply want a set of numbers in a vector which: in the vector v, i want the numbers be (x[1]*x[2]*....*x[100], x[2]*x[3]*...*x[100], x[3]*x[4]*...*x[100],...,x[98]*x[99]*x[100], x[99]*x[100],x[100]) so there should be 100 elements in the vector. here's how i do it x=rnorm(100,0.5,0.2) v=prod(x[(1:100):100]) but it turns out failed as it says there are 100 elements in the expression, but only
2005 Jul 12
3
elegant matrix creation
Hi I want to write a little function that takes a vector of arbitrary length "n" and returns a matrix of size n+1 by n+1. I can't easily describe it, but the following function that works for n=3 should convey what I'm trying to do: f <- function(x){ matrix(c( 1 , 0 , 0 , 0, x[1] , 1 , 0 , 0, x[1]*x[2] , x[2] , 1 , 0,
2010 Sep 21
1
NA problem
Dear R list I have a problem with NA, which should be a string, but R seems that it doesn't recognize it. What I do is first give the format command to my data frame: format.data.frame(mydata,big.mark=" ") so I give a blank as thousand separator. All my records in my data frame become strings, so instead of having NA I have "NA". I try to convert "NA" in
2010 Jun 17
1
RKWARD
Dear list, I have a question. I have the RKward configuration. I don't know what happened but now when I open R I have in my workspace data frames with which I used in the past sessions.How can I set RKward in order to open a new workspace? Thanks a lot [[alternative HTML version deleted]]
2010 Jun 03
1
cumsum function with data frame
Dear list, I have a problem with the cumsum function. I have a data frame like the following one variable Year value EC01 2005 5 EC01 2006 10 AAO1 2005 2 AAO1 2006 4 what I would like to obtain is variable Year value cumsum EC01 2005 5 5 EC01
2010 Jun 14
2
recursive function
Dear list, I have the following problem, what i'm trying to do is to built a function which does the following calculationg in a recursive way: I have a data frame more or less like this: variable year DELTA EC01 2006 / EC01 2007 10 EC01 2008 5 EC01 2009 9 And then I have at time
2006 Jan 09
3
prod(numeric(0)) surprise
It surprised me that prod(numeric(0)) is 1. I guess if you say (operation(nothing) == identity element) this makes sense, but ?? Looking in the code, this makes sense: basically (s=1; for i=0 to length(x), multiply s by x[i]) -- which comes out to 1. What *should* prod(numeric(0)) produce? I couldn't find the answer documented anywhere. (And how about sum(numeric(0))==0, which for
2010 Jun 17
1
big big problem
Dear list, I'll try to be more clear in explaining my problem. I have a data frame like this called X: CLUSTER YEAR variable value1 value2 M1 2005 EC01 NA NA M1 2006 EC01 2 5 M1 2007
2010 May 05
1
testInstalledBasic question
Hi, I'm currently in the process of writing an R-installation SOP for my company. As part of that process I'm using the recommendations from the 'R Installation and Administration' document, section 3.2, "Testing an installation". This is done on an XP machine, using the latest binary of 2.11.0. The binary is downloaded and then installed from the installer. I then