search for: aoleary

Displaying 3 results from an estimated 3 matches for "aoleary".

2012 May 25
3
Breaking up a vector
Hi all, My problem is as follows: I want to run a loop which calculates two values and stores them in vectors r and rv, respectively. They're calculated from some vector x with length a multiple of 7. x <- c(1:2058) I need to difference the values but it would be incorrect to difference it all in x, it has to be broken up first. I've tried the following: r <- c(1:294)*0 rv
2011 Mar 19
1
I want to create an object to use for the plot command
I'm using the TSA package (along with all prerequisites) to do some GARCH work and for some reason, something which used to work for me has decided to up and stop. The code is as follows, after loading the package: " gs <- garch.sim(alpha=c(1.9,0.1), beta=c(0.700001, -0.0800003, -0.016),rnd = rnorm, n = 400, ntrans=500) gs1 <- garch.sim(alpha=c(1.9,0.1), beta=c(0.7, -0.08,
2011 Dec 01
2
Writing a function, want a string argument to define the name of the excel sheet to be called
My question is this: is there a way I can make one of the arguments of the function be a string the user can enter, and then have that be the excel filename? ie, foo <- function(x,y,NAME){ #make a matrix with x rows and y cols M <- matrix(nrow=x,ncol=y) #write the matrix write.table(M, file = "result.csv",append=TRUE, sep = ",") } I've had a look but I