similar to: vector math: calculating a rolling 12 row product?

Displaying 20 results from an estimated 10000 matches similar to: "vector math: calculating a rolling 12 row product?"

2008 Jan 13
3
product of vector elements
All, I would like to find a simper method that I now have to find the product of all elements in a vector: #get product of vector elements: (1,2,3,4,5) vec.product <- exp(sum(log(c(1,2,3,4,5)))) I have not found a vector product function, if one has been written. Thanks, Gerard [[alternative HTML version deleted]]
2006 Jan 11
3
SPSS and R ? do they like each other?
... and is there also such a nice tool (like spss.get) for exporting data frames to SPSS? write.table does not keep the data frame labels - neither did the other exporting tools that I found. Thanks! Michael [[alternative HTML version deleted]]
2004 Jun 09
3
Dot chart question
Running R 1.8.1 on a Windows machine In dotchart, I would like to shrink the labels on the tick marks (that is, the numbers) without shrinking anything else. I could not find this in either the Rhelp archives or in ?dotchart, which recmmends cex to avoid 'label overlap', but cex shrinks all the characters in the plot. Is there a way to do this? Thanks Peter Peter L. Flom, PhD
2005 May 19
2
laten class analysis
Dear List, just a little question, I am interested in Latent Class Analysis and I guess if there is a package for this pourpose thank for you help, Simone
2005 Nov 10
2
polynomials transformation
Dear All, Need some help in polynomials transformation to get the coefficients. I have tried "poly.transform" as applied in S-plus but it does not work. Thanks in advanced for any helps. Regards. Abd. Rahman Kassim (PhD) Head Forest Ecology Branch Forest Management & Ecology Program Forestry and Conservation Division Forest Research Institute Malaysia Kepong 52109 Selangor,
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
2005 Nov 29
2
Calculating the 2th power of a vector
Hi every body , I simply want to calculate the 2th power of a vector without changing the sign of values. How it is possible in R ? Thanks a lot for any idea. Amir --------------------------------- [[alternative HTML version deleted]]
2004 Jun 06
4
Request help writing a function
I have been wrestling with this function for quite a while, and am not making headway. 1) I want to apply a function to the following columns of a dataframe: myfunction. <- apply(ph5028[,c(83:107)],2,function(x) ... 2) Within each of the above columns there is a single numeric code, 1, 2 or 3 or an NA. 3) My goal is to determine the percent of time each person used a 2 code. So if a person
2006 Mar 09
3
substituting values
dear list, i have a matrix with missing values like 1 2 3 4 x x 2 2 2 2 2 2 2 x 2 the x stands for the missing value. i have to substitute it to NA substitute or replace didn´t work out, as they are for vectors only however matrix[,i] also didn´t work. can anybody tell me, who i can change these values easily? thanks stefan [[alternative HTML
2004 Dec 06
3
removing NA as a level
Dear R-helpers, I have a problem which I suppose is trivila, but... I have included NA values as factors ( (to be able to make nice printed summaries with NAs % ba category ) with the following code dat$x.f<-factor(dat$x, exclude=NULL); levels(dat$x.f)<-c("A1","A2","A3","A4","NA"); length(dat$x.f) Now, I want to impute the missing values.
2004 Apr 16
4
t.test & formatting question
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello all - I'm trying to format some data where I only need one of the values returned from a test, say a t-test in this instance. I have the following: > R.version.string [1] "R version 1.9.0, 2004-04-12" > x <- rnorm(1001) > t.test(x)$statistic t 0.5555321 > Any easy way (other than straight
2004 Mar 30
3
DataEntryWindow
When I originally posted my question under ( C-c C-c does not kill data editor), I thought that it was a problem with ESS rather than R. However, I have tried to do the same from a command line R (R 1.8.1 (2003-11-21). on a debian testing i386 machine) and I got the same problem. Specifically I cannot kill the DataEntryWindow by issuing C-c (control c). However, unless I issue the C-c command the
2004 Nov 29
6
Citation
Hello! I would like to know how do I citate R? I have used it during my Master thesis but I don’t know how to citate during the text and on the references. I’ve looked for it on the web page but only found how to citate the FAQ. Thank you in advance. Tatiana Fernandes Universidade Estadual do Norte Fluminense Laboratório de Ciências Ambientais - CBB Av. Alberto Lamego, 2.000 - Campos dos
2005 Feb 08
1
Plotting estimated betas, standard error
Hello, I was wondering, is there a way to plot estimated betas and standard deviations that I've generated? Specifically, I have the following: A matrix of estimated betas (two different betas, 4 different simulations - categories). A matrix of estimated standard errors corresponding to each of those betas. I would like to plot the estimated beta, and make a confidence
2004 May 26
1
Venn diagrams
Hello there, Does anyone know how to plot venn diagrams in R? Ive searched the mail archive lists but to no avail. Regards, Wayne Jones KSS Ltd Seventh Floor St James's Buildings 79 Oxford Street Manchester M1 6SS England Company Registration Number 2800886 Tel: +44 (0) 161 228 0040 Fax: +44 (0) 161 236 6305 mailto:kssg@kssg.com http://www.kssg.com The information in this
2004 Jun 05
2
'invalid HOMEDRIVE'
Dear all, One of my students have installed R1.9.0 on windows, and gets the fatal error 'invalid HOMEDRIVE' Can anyone help her/me out on that one? Thanks in advance Søren Højsgaard [[alternative HTML version deleted]]
2004 Feb 02
2
ordering in dotplot
Dear R-friends, the dataset I am using (data.it) is organized as follows partner stp btp reg hk 0.64 1 s ger 0.27 1 d tur 0.27 1 s rom 0.24 1 s-f por 0.24 1 s spa 0.23 1 s gre 0.22 1 d-f aus 0.17 1 d uk 0.16 1 s be 0.16 1 d arg 0.15 1 s usa 0.13 1 d-f fra 0.13 1 s neth
2006 Feb 18
2
Conversion to Adjacency Matrix
I have data in the following form: ID COUPON0 COUPON1 COUPON2 COUPON3 1 1 1000 1001 1002 2 2 NA NA NA 3 1000 1003 NA 1004 4 1001 NA 1005 NA 5 1002 NA NA NA 12 1003 NA NA 1006 7 1005 NA NA NA 8 1004 1007 NA NA 9 1006 NA NA NA 26
2004 Feb 15
1
manova() with a data frame
I'm trying to learn to use manova(), and don't understand why none of the following work: > data(iris) > fit <- manova(~ Species, data=iris) Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : incompatible dimensions > fit <- manova(iris[,1:4] ~ Species, data=iris) Error in model.frame(formula, rownames, variables, varnames, extras,
2004 May 28
1
dotchart questions
I am trying to put 3 dotcharts side-by-side with minimal space between each. Each chart is for a different variable, but the vertical axes are the same. I want to have vertical axis labels on the lefthand chart but no vertical axis labels on the other two. Plus, I would like very little space between charts 1 & 2 and between charts 2 & 3. I have one approach but am not too happy with