Seasonal ARIMA is in the package:
http://www.robhyndman.info/Rlibrary/forecast/index.html
If you are interested in time series look at
http://zoonek2.free.fr/UNIX/48_R/all.html
Hope this help
Robert
-Original Message-
From: [EMAIL PROTECTED] [mailto:r-help-
[EMAIL PROTECTED] On
As said by Pierre Bady,
an answer to your question is NIPALS analysis.
PCA is usually obtained by the diagonalization of a variance-covariance
matrix. But it can also be obtained by an iterative proedure which
consists in two regressions. NIPLAS is an implementation of this
iterative procedure
Kartik Pappu wrote:
Hello all,
I am trying to use R to create a colored data matrix. I have my data
which (after certain steps of normalization and log transformation)
gives me a x by y matrix of numbers between 0 and -5. I want to be
able to create from this matrix of numbers a x by y
Dear Michael,
I have a problem with RODBC installation. When I try to install it, I
get the output following output. Give me some ideas, why I can not to do
it properly?
Regards,
Tomasz
* Installing *source* package 'RODBC' ...
checking for gcc... gcc
checking for C
Dear r-help,
I have a matrix, suppose, 10x10, and I need the matrix 5x5, having
in each cell a mean value of the cells from the initial matrix.
Please, point me to a function in R, which can help me doing that.
Digging the documentation and mail archives didn't give me a result.
Dear All!
If I pass an object to an assignment function I cannot get it's name by
deparse(substitute(argument)), but I get *tmp* and I found no way to get
the original name, in the example below it should be va1.
Is there a way?
Thanks,
Heinz
## example
'fu1-' - function(var, value) {
Thank you... I will definitely check that up.
Quin
-Original Message-
From: Stéphane Dray [mailto:[EMAIL PROTECTED]
Sent: 27 July 2006 09:04 AM
To: Quin Wills
Cc: 'Berton Gunter'; r-help@stat.math.ethz.ch
Subject: Re: [R] PCA with not non-negative definite covariance
As said by Pierre
If you are willing to write fu2[Var] - 3 instead of fu2(Var) - 3
then this workaround may suffice:
fu2 - structure(NA, class = fu2)
[-.fu2 - function(x, ..., value) { print(match.call()[[3]]); fu2 }
# test
fu2[Var] - 3 # prints Var
On 7/27/06, Heinz Tuechler [EMAIL PROTECTED] wrote:
Dear
Is this what you want: the mean of the surrounding 4 cells?
x - matrix(1:100, 10) # create data
rmean - matrix(0,5,5) # result matrix
for (i in 1:5){
+ for (j in 1:5){
+ rmean[i, j] - mean(x[c(-1,0) + 2 * i, c(-1,0) + 2 * j])
+ }
+ }
x
[,1] [,2] [,3] [,4] [,5] [,6]
Right, I think I understand the question.
library(magic)
?subsums
If you want a windowed moving average, do:
x - matrix(1:100,10,10)
subsums(x,6,FUN=mean,pad=NA,wrap=F)[6:10,6:10]
If you want block average, do:
subsums(x,2,FUN=mean,pad=NA,wrap=F)[seq(2,10,2),seq(2,10,2)]
which agrees
Hi,
To make moving average, I advise you, to read a document in my web to make
forecasting,
http://www.juanantonio.info/p_research/statistics/r/forecasting.htm
http://www.juanantonio.info/p_research/statistics/r/forecasting.htm
This scripts use the library forecast and the function pegels.
On 7/27/06, Frank E Harrell Jr [EMAIL PROTECTED] wrote:
I am trying to study four-way interactions in an ANOVA problem.
However, qqnorm+qqline result
(at http://phhs80.googlepages.com/qqnorm.png)
is not promising regarding the normality of data (960 observations).
The result of
Assuming the problem is to partition the 10x10 matrix x into 25 two by two
squares and then average each of those squares, try this:
apply(array(x, c(2,5,2,5)), c(2,4), mean)
On 7/27/06, Vladimir Eremeev [EMAIL PROTECTED] wrote:
Dear r-help,
I have a matrix, suppose, 10x10, and I need the
Dear jim,
Yes.
But, unfortunately, two nested for loops will execute very slow.
It is not very serious problem to do my task with an image
processing package, I am wondering if it is efficiently possible with
R.
Thursday, July 27, 2006, 2:20:13 PM, you wrote:
jh Is this what you want: the mean
Dear Robin,
Thank you, seems it is what I need.
---
Best regards,
Vladimirmailto:[EMAIL PROTECTED]
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
Thanks, everyone.
I'll give freeTDS a try.
Cheers,
Whit
-Original Message-
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 27, 2006 1:17 AM
To: Marc Schwartz
Cc: Armstrong, Whit; r-help@stat.math.ethz.ch
Subject: Re: [R] RODBC on linux
On Wed, 26 Jul 2006, Marc
Paul Smith wrote:
On 7/27/06, Frank E Harrell Jr [EMAIL PROTECTED] wrote:
I am trying to study four-way interactions in an ANOVA problem.
However, qqnorm+qqline result
(at http://phhs80.googlepages.com/qqnorm.png)
is not promising regarding the normality of data (960 observations).
The
On Thu, 2006-07-27 at 11:16 +0200, Tomasz Puzyn wrote:
Dear Michael,
I have a problem with RODBC installation. When I try to install it, I
get the output following output. Give me some ideas, why I can not to do
it properly?
Regards,
Tomasz
* Installing
I see that plot.default uses deparse(substitute(x)) to extract the
character name of an argument and put it on the vertical axis.
Hence:
foo - 1:10
plot( foo )
will put the label foo on the vertical axis.
However, for a function that takes a ... list as an input, I can only
extract the first
See ?match.call
On 7/27/06, Armstrong, Whit [EMAIL PROTECTED] wrote:
I see that plot.default uses deparse(substitute(x)) to extract the
character name of an argument and put it on the vertical axis.
Hence:
foo - 1:10
plot( foo )
will put the label foo on the vertical axis.
However, for
Dear Sean,
Thursday, July 27, 2006, 3:31:31 PM, you wrote:
SOR Hi Vladimir,
SOR I was wondering whether this was image related :-)
Yes, that's right, I am doing image processing with R.
SOR would one of the image related libraries do it for you?
SOR looking at
SOR
On Thu, 2006-07-27 at 08:18 -0400, Armstrong, Whit wrote:
I see that plot.default uses deparse(substitute(x)) to extract the
character name of an argument and put it on the vertical axis.
Hence:
foo - 1:10
plot( foo )
will put the label foo on the vertical axis.
However, for a
That works perfectly.
Thanks,
Whit
-Original Message-
From: Marc Schwartz [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 27, 2006 8:41 AM
To: Armstrong, Whit
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] deparse(substitute(foo))
On Thu, 2006-07-27 at 08:18 -0400, Armstrong, Whit
Transpose vector extracted from a matrix
Hello,
I am doing a recursive analysis that uses every line (vector) of a matrix in
a loop. In the model, I need to transpose those vectors that are extracted
from a matrix.
Using simple vectors (no matrix involved) the transpose function works fine:
At 06:10 27.07.2006 -0400, Gabor Grothendieck wrote:
If you are willing to write fu2[Var] - 3 instead of fu2(Var) - 3
then this workaround may suffice:
fu2 - structure(NA, class = fu2)
[-.fu2 - function(x, ..., value) { print(match.call()[[3]]); fu2 }
# test
fu2[Var] - 3 # prints Var
Thank
The complexity of the function should not matter.
Here is another example of this technique:
http://tolstoy.newcastle.edu.au/R/help/04/06/1430.html
On 7/27/06, Heinz Tuechler [EMAIL PROTECTED] wrote:
At 06:10 27.07.2006 -0400, Gabor Grothendieck wrote:
If you are willing to write fu2[Var] - 3
Hi
I have a little vector function that takes a vector A of strictly
positive integers
and outputs a matrix M each of whose columns is the vector, modified in
a complicated combinatorical way.
Now I want to generalize the function so that A can include zeroes.
Given A,
I want to strip out
Hi,
I need some help
I have a matrix M(m,n) in which each element is a vector V of lenght 6
1 2 3 4 5 6 7
1 List,6 List,6 List,6 List,6 List,6 List,6 List,6
2 List,6 List,6 List,6 List,6 List,6 List,6 List,6
3 List,6 List,6 List,6 List,6 List,6 List,6 List,6
This is not as elegant, but should work:
a3 - f(A2)
a3[ which( apply(a3,1,prod) == 0 ), ] - rep(0,ncol(a3))
a3
Essentially use the product to pick out the rows with at least one 0 and
replace these rows with 0s.
HTH.
-Christos
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL
Hi Christos
thanks for this, but it won't work because in my application
f(A2) will fail if there are any zeroes in A2.
cheers
rksh
On 27 Jul 2006, at 15:10, Christos Hatzis wrote:
This is not as elegant, but should work:
a3 - f(A2)
a3[ which( apply(a3,1,prod) == 0 ), ] -
Dear R-helpers,
Can anyone tell me how to fix this:
library(Rgraphviz)
Loading required package: graph
Loading required package: Ruuid
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library '/Library/Frameworks/R.framework/
Hello Robin,
Here's a solution.
library(micEcon)
nozeros -f(A2[A20])
zeroslines - which(A2==0) #identify rows to insert zeros
withzeros -nozeros #initialize matrix with zeros
for (i in zeroslines){
withzeros - insertRow(withzeros,i,0)
}
withzeros
Neurooo
From: Robin Hankin [EMAIL PROTECTED]
Unfortunately this does not work for lattice graphics. In such case I
do something like the following, but I still do not know how to plot
Greek letters in the panel titles:
theta - 2.1
gr - as.factor(c(1,2))
levels(gr)[1]-Group 1
levels(gr)[2]-Group 2
library(lattice)
print(xyplot(1~1|gr,
Try this where f and A2 are as in your post:
out -f(A2[A20])
replace(matrix(0, length(A2), ncol(out)), A2 0, out)
On 7/27/06, Robin Hankin [EMAIL PROTECTED] wrote:
Hi
I have a little vector function that takes a vector A of strictly
positive integers
and outputs a matrix M each of
Hi Robin,
Ok. I see. Try this then:
f - function(a){if( any(a==0) ) stop(Zeros in input vector) else
cbind(a,a+1,rev(a))}
a2 - c(1,0,0,2,4,0,3)
f(a2) # error message
f2 - function(a) {
indx.zero - which(a==0)
indx.nz - (1:length(a))[-indx.zero]
x - f(a[indx.nz])
xx -
Use the notation x[ , 1, drop = FALSE]
See ?[
On 7/27/06, Neuro LeSuperHéros [EMAIL PROTECTED] wrote:
Transpose vector extracted from a matrix
Hello,
I am doing a recursive analysis that uses every line (vector) of a matrix in
a loop. In the model, I need to transpose those vectors that are
Gabor, Christos
great, two elegant vectorized solutions. I spent quite a long time
trying to generalize my f() to accept zeroes with no luck (long
story), so either of these solutions is fine.
TDH [this *did* help]
rksh
On 27 Jul 2006, at 15:34, Christos Hatzis wrote:
Hi Robin,
Ok.
Armstrong, Whit wrote:
Thanks, everyone.
I'll give freeTDS a try.
One final hitch to be aware of when using FreeTDS:
MS SQL Server authenticates db connections in two different ways (well
actually three, but it's just the combination of 1 and 2):
1) Sql server authenticates the connection,
Try this where gr and theta are as in your post:
xyplot(1~1|gr,
main = as.expression(bquote(theta == .(theta))),
strip = strip.custom(factor.levels = expression(theta, beta))
)
On 7/27/06, Valentin Todorov [EMAIL PROTECTED] wrote:
Unfortunately this does not work for lattice
Here's a way to convert a matrix of vectors like you have into an array:
x - array(lapply(seq(0,len=6,by=4), +, c(a=1,b=2,c=3,d=4)),
dim=c(2,3), dimnames=list(c(X,Y),c(e,f,g)))
x
e f g
X Numeric,4 Numeric,4 Numeric,4
Y Numeric,4 Numeric,4 Numeric,4
x[[Y,e]]
a b c d
5 6 7
I'm using R (windows) version 2.1.1, randomForest version 4.15.
I call randomForest like this:
my.rf=randomForest(x=train.df[,-response_index], y=train.df[,response_index],
xtest=test.df[,-response_index], ytest=test.df[,response_index],
importance=TRUE,proximity=FALSE, keep.forest=TRUE)
Dear R members,
Sorry for this question. I have a dataframe (please see the example) and i
should do the following transformation:
DF
abc d e f g h i n
14 24 rcvfAG5 2 1 0 2 1
58 42 grde AC2 5 0 5 1 0
I should transforme my DF like
I think the confusion relates to the fact that in R vectors are not 2D
arrays with one dimension set to 1.
So your 'simplevector' is not a vector, and your 'extractedvector3x1'
and 'extractedvector1x3' are in fact not 3x1 or 1x3, they are 3-element
vectors, which sometimes behave like 1x3 arrays,
replace 0 with NA and then back again:
f
function(a){cbind(a,a+1,rev(a)
)}
f(1:5)
a
[1,] 1 2 5
[2,] 2 3 4
[3,] 3 4 3
[4,] 4 5 2
[5,] 5 6 1
x - c(1,0,3,4,0,5)
f(x)
a
[1,] 1 2 5
[2,] 0 1 0
[3,] 3 4 4
[4,] 4 5 3
[5,] 0 1 0
[6,] 5 6 1
x[x==0] - NA
f(x)
a
[1,] 1 2 5
[2,] NA NA
Hi to everybody!
I´m just a beginner in R, and I´m trying to replace values in a distance
matrix with a concret condition: replace all values (elements) lower than 4.5
with value=18.
I´ve tried this, but it doesn´t work...
Dxy would be my 117 x 117 euclidean distance matrix
M4.5[M4.5 4.5] - 18
On 7/27/06, Mari Carmen Garcia Esteban [EMAIL PROTECTED] wrote:
Hi to everybody!
I´m just a beginner in R, and I´m trying to replace values in a distance
matrix with a concret condition: replace all values (elements) lower than
4.5 with value=18.
I´ve tried this, but
Hi,
I've looked through the archives and seen several posts discussing technical
differences between R and S(plus). It appears to me that R can likely
functionally replace Splus for my situation, but I'm more interested in looking
at the risks and benefits of moving from Splus to R from
Dave wrote:
Hi,
I've looked through the archives and seen several posts discussing
technical differences between R and S(plus). It appears to me that R can
likely functionally replace Splus for my situation, but I'm more interested
in looking at the risks and benefits of moving
How large is your data?
If its large you may or may not have problems. If its small you probably
won't. Try prototyping the most data intensive portion in R before you
commit significant resources.
S Plus can time stamp objects and R cannot although you could come
up with some workarounds for
Dear all,
I am reading the data using read.table. However, there are a few rows I
want to skip. How can I do that in an easy way? Suppose I know the row
number that I want to skip. Thanks so much!
__
R-help@stat.math.ethz.ch mailing list
Just read them in and throw them away:
read.table(myfile.dat, ...whatever...)[-c(10, 12), ]
On 7/27/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Dear all,
I am reading the data using read.table. However, there are a few rows I
want to skip. How can I do that in an easy way? Suppose I
From: Eleni Rapsomaniki
I'm using R (windows) version 2.1.1, randomForest version 4.15.
^
Never seen such a version...
I call randomForest like this:
my.rf=randomForest(x=train.df[,-response_index],
__
R-help@stat.math.ethz.ch 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.
With remiss, I haven't tried these R tools.
However, I tried a dozen Naive Bayes-like programs, often used to filter
email, where the serious problem with spam has resulted in many
innovations.
The most touted of the worldwide Naive Bayes programs seems to be
CRM114 (not in R, I expect, since its
Thanks again for everyone's help. I have a successful configuration.
I used the ODBC-combined configuration which is documented here:
http://freetds.org/userguide/odbcombo.htm
here are the config files residing in my home dir:
-bash-2.05b$ cat .freetds.conf
[global]
tds version = 7.0
Hi,
I don't think my first email worked, so here it is again.
I'd like to know if there is a nonmetric MDS function or package for R. I've
beening trying to do a problem in Stata but I'm going crazy with it. A simple
problem is becoming difficult so maybe R can help. Any suggestions?
Walt
Hi Dave. I'll try to offer some feedback from a fellow non-stats guy
working in a business setting. I've not directly transitioned from S+
to R, but I've previously hit roadblocks with SAS and SPSS that
compelled me to investigate the S/R languages.
I think that as you read messages on this
[EMAIL PROTECTED] wrote:
Hi,
I don't think my first email worked, so here it is again.
I'd like to know if there is a nonmetric MDS function or package for R. I've
beening trying to do a problem in Stata but I'm going crazy with it. A
simple problem is becoming difficult so maybe R can
58 matches
Mail list logo