Re: [R] How to join matrices of different row length from a list

2011-01-07 Thread A.N. Spiess

Dear Emma,

there is a 'cbind.na', 'rbind.na' and 'data.frame.na' function in my qpcR
package.

library(qpcR)
matLis - list(matrix(1:4, 2, 2), matrix(1:6, 3, 2),
 matrix(2:1, 1, 2))
do.call(cbind.na, matLis)

They are essentially the generic functions extended with an internal fill.

You might also want to try these examples:

## binding
cbind.na(1, 1:7) # the '1' (= shorter vector) is NOT recycled but filled
cbind.na(1:8, 1:7, 1:5, 1:10) # same with many vectors
rbind.na(1:8, 1:7, 1:5, 1:10) # or in rows

a - matrix(rnorm(20), ncol = 4) # unequal size matrices
b - matrix(rnorm(20), ncol = 5)
cbind.na(a, b) # works, in contrast to original cbind
rbind.na(a, b) # works, in contrast to original rbind

## data frame with unequal size vectors
data.frame.na(A = 1:7, B = 1:5, C = letters[1:3], 
  D = factor(c(1, 1, 2, 2))) 
  
## convert a list with unequal length list items
## to a data frame
z - list(a = 1:5, b = letters[1:3], c = matrix(rnorm(20), ncol = 2))
do.call(data.frame.na, z)

-- 
View this message in context: 
http://r.789695.n4.nabble.com/How-to-join-matrices-of-different-row-length-from-a-list-tp3177212p3178991.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] predict arfima

2008-06-03 Thread A.N.

I noticed that both in the fArma and fracdiff packages it is not possible to
predict an object fitted with an  ARFIMA model. Moreover, the ox link is no
more available. 
However, is it possible to find the coefficient d of differentiation of a
time series, and then predict the time series by apply an arma model to the
filtered time series ?? 

Are there better or other methods to predict ARFIMA models ? 


-- 
View this message in context: 
http://www.nabble.com/predict-arfima-tp17621431p17621431.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] unable to use functions require DLL from package base

2008-05-07 Thread A.N.

Thanks, I had indeed several versions of R and removed the older ones and it
worked.







I suspect you have more than one version of R installed and are mixing 
them up.  Those symbols have been in package stats for quite a while.

Try starting R with --vanilla, and if that works, clean out your startup 
files (see ?Startup).  If not, remove all your R installations and 
reinstall R 2.7.0 (or R-patched).

-- 
View this message in context: 
http://www.nabble.com/unable-to-use-functions-require-DLL-from-package-%22base%22-tp17086783p17101073.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] unable to use functions require DLL from package base

2008-05-06 Thread A.N.

Hi all, 

I have issues using some basic functions in R such as these ones : 

 pp.test(R) (where is a vector of returns)
Error in .C(R_approx, as.double(x), as.double(y), as.integer(nx), xout =
as.double(xout),  : 
  C symbol name R_approx not in DLL for package base

boxcox(reg,plotit=T)  (where reg is an lm object)
Error in .C(spline_coef, method = as.integer(method), n = as.integer(nx), 
: 
  C symbol name spline_coef not in DLL for package base

as I do miss some symbol names. 

How can I overcome this serious problem ? 


-- 
View this message in context: 
http://www.nabble.com/unable-to-use-functions-require-DLL-from-package-%22base%22-tp17086783p17086783.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.