Re: [R] More than on loop??

2010-01-27 Thread che
yes, but the outcome graphs are almost the same, that mean it does not calculated in a cumulative way , if you apply the following code, then run hi(x), and then recta(x), you will see how the shape are similar to the frequency of Amino Acid in the matrix. i am looking for a code that can do

[R] plotting additive ns components

2010-01-27 Thread GlenB
I have an additive model of the following form : zmdlfit - lm(z~ns(x,df=6)+ns(y,df=6)) I can get the fitted values and plot them against z easily enough, but I also want to both obtain and plot the two additive components (the estimates of the two additive terms on the RHS) I've been looking

Re: [R] plotting additive ns components

2010-01-27 Thread David Winsemius
On Jan 27, 2010, at 9:09 PM, GlenB wrote: I have an additive model of the following form : zmdlfit - lm(z~ns(x,df=6)+ns(y,df=6)) I can get the fitted values and plot them against z easily enough, but I also want to both obtain and plot the two additive components (the estimates of the

Re: [R] median of grouped data

2010-01-27 Thread Girish A.R.
Check the package doBy as well (pretty handy for analysis of grouped data). library(doBy) summaryBy(PM~ID,data=d,FUN=median) HTH, -Girish -- View this message in context: http://n4.nabble.com/median-of-grouped-data-tp1311971p1312386.html Sent from the R help mailing list archive at

[R] Problem associated with importing xlsx data file (Excel 2007)

2010-01-27 Thread Steven Kang
Hi all, I have imported xlsx file (Excel 2007) into R using the following scripts. *library(RODBC) * *setwd(...) * *query - odbcConnectExcel2007(xls.file = GI 2010.xlsx, readOnly = TRUE) dat - sqlQuery(query, select * from [sheet1$], as.is = TRUE, na.strings = exp)* *dat* contain one

[R] Constrained vector permutation

2010-01-27 Thread Andrew Rominger
Hello, I'm trying to permute a vector of positive integers 0 with the constraint that each element must be = twice the element before it (i.e. for some vector x, x[i] = 2*x[i-1]), assuming the 0th element is 1. Hence the first element of the vector must always be 1 or 2 (by assuming the 0th

Re: [R] Rcmdr has stopped working

2010-01-27 Thread James Rome
Yes, reinstalling it worked. I wonder what changed to cause this, especially if it happened to someone else? And I was a bit worried because I think tcl/tk is installed elsewhere too. In /usr/local/lib, there is a tcl 8 and tcl 8.5. How do I clean up this install? Thanks, Jim On 1/27/10 5:07

Re: [R] Data.frame manipulation

2010-01-27 Thread AC Del Re
Hi All, I'm conducting a meta-analysis and have taken a data.frame with multiple rows per study (for each effect size) and performed a weighted average of effect size for each study. This results in a reduced # of rows. I am particularly interested in simply reducing the additional

[R] SAS Type 1 / Type 3 Analysis Equivalent.

2010-01-27 Thread Kim Jung Hwa
Hi All, I'm using glm() in R to perform Poisson regression, I'm wondering if its possible to get equivalent Type 1 / Type 3 Analysis (similar to one in PROC GENMOD). Thanks, Kim [[alternative HTML version deleted]] __ R-help@r-project.org

[R] how to compute directions number in Fourier Tranform periodograms

2010-01-27 Thread Robert U
Dear R-users,   I have seen many times posts about Fourier transform, and I am trying to do one right now. Before to apply any scripts, I wonder whether it could properly apply to my problem, and even though it’s not a statistics-helpers mailing list maybe one of you would be able to answer

Re: [R] plotting additive ns components

2010-01-27 Thread John Fox
Dear GlenB, The allEffects() function in the effects package can make these plots. I hope this helps, John -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of GlenB Sent: January-27-10 9:09 PM To: r-help@r-project.org

Re: [R] SAS Type 1 / Type 3 Analysis Equivalent.

2010-01-27 Thread John Fox
Dear Kim, The standard R function anova() produces sequential (type I) tests; the Anova() function in the car package can produce type-III tests (it performs type-II tests by default), but you must be careful with contrast coding if there are terms in the model related by marginality. I hope

[R] Data.frame manipulation

2010-01-27 Thread AC Del Re
Hi All, I'm conducting a meta-analysis and have taken a data.frame with multiple rows per study (for each effect size) and performed a weighted average of effect size for each study. This results in a reduced # of rows. I am particularly interested in simply reducing the additional variables in

[R] If then test

2010-01-27 Thread claytonmccandless
i have a simple question. If i have a 2x2 matrix with [,1] and [,2] i want to test each of these to see if they are below some number. If each component in column is below the number then it returns a 1. Now from this result I would like to add the number of 1's that came up. How can i do this?

Re: [R] Data.frame manipulation

2010-01-27 Thread Petr PIKAL
HI r-help-boun...@r-project.org napsal dne 28.01.2010 04:35:29: Hi All, I'm conducting a meta-analysis and have taken a data.frame with multiple rows per study (for each effect size) and performed a weighted average of effect size for each study. This results in a reduced # of

[R] Odp: If then test

2010-01-27 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 28.01.2010 06:21:40: i have a simple question. If i have a 2x2 matrix with [,1] and [,2] i want to test each of these to see if they are below some number. If each component in column is below the number then it returns a 1. Now from this result

Re: [R] If then test

2010-01-27 Thread GlenB
Do you actually need the intermediate result (the vector of 1's and 0's), or just the result - the total number of columns? Is the number you're comparing to different for each column? Assuming the answers are just the result and comparing to the same number x - matrix(c(4,5,7,2),nc=2) num -

<    1   2