[R] Reg GARCH+ARIMA

2010-03-17 Thread RAGHAVENDRA PRASAD
Hi, Although my doubt is pretty,as i m not from stats background i am not sure how to proceed on this. Currently i am doing a forecasting.I used ARIMA to forecast and time series was volatile i used garchFit for residuals. How to use the output of Garch to correct the forecasted values from

Re: [R] Effect Size Formaula and Calulations in R

2010-03-17 Thread C.H.
pwr package: ES.h and ES.w1, ES.w2, cohen.ES On Wed, Mar 17, 2010 at 1:28 PM, Jim Silverton jim.silver...@gmail.com wrote: Hello, I would like to find out how to use R to compute the effect size of two samples for a two sample t test. Is there a formula for the fisher's exact test? Any R

[R] Summing daily data for each year

2010-03-17 Thread Santosh.Aryal
Hello there I have a DAILY data set (as shown below) with Date and Streamflow from April 1995 to Aug 2006. I want a yearly sum the streamflow value (for each year - first and last incomplete year). Does anyone know how to do this in R? I have tried everything I could think of, e.g.

Re: [R] C# DLL Library

2010-03-17 Thread Romain Francois
The link works fine for me on firefox, chrome and safari. Other ways to get to it are: - search rcpp mailing list on google. - go to r-forge (again google knows where), click on the Rcpp - R/C++ interface, click on the Lists tab, click on subscribe, etc ... Le 17/03/10 04:42, Jeremie Smaga a

Re: [R] Summing daily data for each year

2010-03-17 Thread Tal Galili
HI Santosh, The simplest way I can think of is (after you import the data) to do: tapply(Zvo$V2, YEAR, sum) The question is how to get YEAR. You could do that if you know how to play with date objects. Another option is to do something like: YEAR - as.data.frame(strsplit(Zvo$V2, -))[1,] For

[R] Summing daily data for each year

2010-03-17 Thread Santosh.Aryal
Hello there I have a DAILY data set (as shown below) with Date and Streamflow from April 1995 to Aug 2006. I want a yearly sum the streamflow value (for each year - first and last incomplete year). Does anyone know how to do this in R? I have tried everything I could think of, e.g.

Re: [R] Summing daily data for each year

2010-03-17 Thread Bill.Venables
You might try something like this: ZVo1 - with(ZVo, { Year - substring(as.character(V1), 1, 4) Count - table(Year) ## for a count of days TFlow - tapply(V2, Year, sum) ## total flow data.frame(Year=Year, No=Count, TotalFlow=TFlow) }) Bill Venables CSIRO/CMIS

Re: [R] odfWeave Error

2010-03-17 Thread lith
I am following an example from online and am getting the following error: .Error unizipping fileunzip not found. Are zip and unzip in your path? If not you could use odfWeaveControl. Example: odfctrl - odfWeaveControl( zipCmd = c(h:/bin/zip.exe -r $$file$$ ., h:/bin/unzip.exe -o $

[R] Why eval(parse(text=var(vec))) return a matrix but NOT a number?

2010-03-17 Thread Yong Wang
Dear List I am getting a problem when using eval(parse). Code below sketchs what I am trying to do: For each row of a N*K dataframe (I use a 2*2 dataframe in the example below), applying a number of functions and get the outputs (two functions, sum and var are used in the example below). The

Re: [R] C# DLL Library

2010-03-17 Thread Dieter Menne
JSmaga wrote: I was aware of the R(D)COM. In the last public version, there is now splash screen appearing which is kind of boring so I think I need to buy it or something. I would pay for RDCOM, but it requires that you explain the details of you application spread (which is mostly 1

Re: [R] C# DLL Library

2010-03-17 Thread Philippe Grosjean
Hello, Also, if you go for socket connection, you could give a try to svSocket. Best, Philippe ..°})) ) ) ) ) ) ( ( ( ( (Prof. Philippe Grosjean ) ) ) ) ) ( ( ( ( (Numerical Ecology of Aquatic Systems ) ) ) ) ) Mons University,

[R] define F-ratio computations with aov

2010-03-17 Thread Galanidis Alexandros
Greetings to all, This is my model: aov.fit-aov(Y~A+B+C+D+E+A:C+A:E) In summary(aov.fit) all F values are comptuted by eg MS(A)/MS(Residuals). This is not correct (or what I want), except for F(B) and F(A:E). I suppose P values are not correct either. Is it possible with aov to define the way

Re: [R] C# DLL Library

2010-03-17 Thread Jeremie Smaga
Hi guys, Correct me if I am wrong, but R(D)COM (and hence RServe and so on) allow you to run R code from C# but is useless to use C(# or ++) code in R right? Because it is in fact what I am trying to find out in this post. Thanks for the tips though, I was also looking for some information

Re: [R] PCA - blank loadings

2010-03-17 Thread S Ellison
Which principal component function are you using? Check the documentation for that and look for the part of the object that provides the PC's. Those are your loadings. Xanthe Walker xanthe.wal...@gmail.com 16/03/2010 23:16:47 Hi, I have successfully completed a PCA and printed the loadings,

Re: [R] C# DLL Library

2010-03-17 Thread Dieter Menne
JSmaga wrote: Correct me if I am wrong, but R(D)COM (and hence RServe and so on) allow you to run R code from C# but is useless to use C(# or ++) code in R right? Correct. I use a c wrapper if I want to run c# code from R similar, but it can get nasty to cross the marshalling barrier.

Re: [R] How to parse a string (by a new markup) with R ?

2010-03-17 Thread Tal Galili
Wow, Thank you very much Andrej! Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English)

[R] Transform contingency table into data.frame ?

2010-03-17 Thread Carlos Petti
Dear list, I have a contingency table : a - letters[1:3] t - table(a) I'm looking for a way to transform this table into data frame, as follows : Freq a1 b1 c1 I used : df - as.data.frame(t, row.names = names(t)) But, this function do not remove the duplicated column. Do you

Re: [R] cut out single lines out of matrix

2010-03-17 Thread Petr PIKAL
Hi I am a bit curious why one shall do such a twisted construction. Accessing list is basically the same as accessing corresponding matrix row, you only need to remember drop=FALSE option. Regards Petr r-help-boun...@r-project.org napsal dne 17.03.2010 00:58:54: Here is a way of creating a

Re: [R] Transform contingency table into data.frame ?

2010-03-17 Thread Ivan Calandra
Hi, I don't really understand what the problem is... There is no duplicated column... Maybe you mean the row names? If it is so, then just don't use row names. Ivan Le 3/17/2010 10:45, Carlos Petti a écrit : Dear list, I have a contingency table : a- letters[1:3] t- table(a) I'm looking

[R] Odp: Transform contingency table into data.frame ?

2010-03-17 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 17.03.2010 10:45:48: Dear list, I have a contingency table : a - letters[1:3] t - table(a) I'm looking for a way to transform this table into data frame, as follows : Freq a1 b1 c1 I used : df - as.data.frame(t,

Re: [R] Constrained non linear regression using ML

2010-03-17 Thread Corrado
Dear Gabor, dear R users, I had already read the betareg documentation. As far as I can understand from the help, it does not allow for constrained regression. Regards Gabor Grothendieck wrote: Check out the betareg package. On Tue, Mar 16, 2010 at 2:58 PM, Corrado ct...@york.ac.uk wrote:

Re: [R] Transform contingency table into data.frame ?

2010-03-17 Thread Carlos Petti
Dear list, Sorry, I did not explain myself very well. I want to obtain a data.frame like this : Freq a1 b1 c1 This data.frame contains just one column (Freq) and each row is named. But when I use this code : df - as.data.frame(t) or this code : df - as.data.frame(t,

[R] Odp: Missing index in vector assignment

2010-03-17 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 17.03.2010 00:03:21: Dear r-helpers, I am getting a mismatch error between two variables: svp - ksvm(x, y, type=nu-svc) Error in .local(x, ...) : x and y don't match. and I suspect that it might be due to missing index in the y variable

Re: [R] Transform contingency table into data.frame ?

2010-03-17 Thread Petr PIKAL
Hi and did you try my suggestion? as.data.frame(as.matrix(t, row.names = names(t))) Regards Petr r-help-boun...@r-project.org napsal dne 17.03.2010 11:16:43: Dear list, Sorry, I did not explain myself very well. I want to obtain a data.frame like this : Freq a1 b1 c1

Re: [R] Transform contingency table into data.frame ?

2010-03-17 Thread Eik Vettorazzi
Hi Carlos, try as.data.frame.table(t) hth. Carlos Petti schrieb: Dear list, I have a contingency table : a - letters[1:3] t - table(a) I'm looking for a way to transform this table into data frame, as follows : Freq a1 b1 c1 I used : df - as.data.frame(t, row.names =

Re: [R] Transform contingency table into data.frame ?

2010-03-17 Thread Ivan Calandra
I would then just change it using names() For example: names(df) - c(letter, Freq) df letter Freq a a1 b b1 c c1 If you prefer having nothing, I don't really know how to do it because I couldn't use my dataframes without column names! HTH Ivan Le 3/17/2010

Re: [R] Transform contingency table into data.frame ?

2010-03-17 Thread Ivan Calandra
Now I get it, I was still thinking you wanted two columns. I was confused by the print example. Petr's suggestion works well then Ivan Le 3/17/2010 11:27, Petr PIKAL a écrit : Hi and did you try my suggestion? as.data.frame(as.matrix(t, row.names = names(t))) Regards Petr

[R] hexadecimal colors

2010-03-17 Thread Hadassa Brunschwig
Hi I would like to produce a red shading I figured the easiest way to do that would be to use rgb in the following way: a- seq(0,0.9,by=0.1) redshade - rgb(red=1,green=a, blue=a) However, I don't really know how to plot things using hexadecimal colors. I used a function which tries

[R] save data to an R object

2010-03-17 Thread cheba meier
Dear R people, Is it possible to save three data sets in an R object and to call each data from this object independently! Regards, Cheba [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] hexadecimal colors

2010-03-17 Thread jim holtman
To plot, just use 'redshade' plot(1:10, col=redshade, cex=4,pch=16) On Wed, Mar 17, 2010 at 6:55 AM, Hadassa Brunschwig hadassa.brunsch...@mail.huji.ac.il wrote: Hi I would like to produce a red shading I figured the easiest way to do that would be to use rgb in the following way: a

Re: [R] save data to an R object

2010-03-17 Thread Ivan Calandra
Hi, Here is one option: #some sample dataframes df1 - data.frame(letter=letters[1:3], number=1:3) df1 - data.frame(letter=letters[4:6], number=4:6) #save the dataframes save(df1, df2, file=test.Rda) #load them in another session load(test.Rda) df1 letter number 1 a 1 2 b

Re: [R] save data to an R object

2010-03-17 Thread jim holtman
?list Intro to R That is what a list is for. On Wed, Mar 17, 2010 at 6:56 AM, cheba meier cheba.me...@googlemail.comwrote: Dear R people, Is it possible to save three data sets in an R object and to call each data from this object independently! Regards, Cheba [[alternative HTML

Re: [R] Help running a Fortran subroutine from R

2010-03-17 Thread Berend Hasselman
dc896148 wrote: Then I pass the parameters according to the order they are specified in the filter: array - data.matrix(read.table(time702.txt,header=F)) array1 - array nx - 60 ny - 120 halfintx - 3 halfinty - 3 mask - matrix(array(rep(1.0,25)),5,5) subarray - matrix(0,5,5)

Re: [R] Transform contingency table into data.frame ?

2010-03-17 Thread Carlos Petti
Dear list, Thank you for your answers. Petr, your solution works great :-) Peter's solution too. Carlos 2010/3/17 Ivan Calandra ivan.calan...@uni-hamburg.de Now I get it, I was still thinking you wanted two columns. I was confused by the print example. Petr's suggestion works well then

Re: [R] testing parallelism of does-response curves using package drc

2010-03-17 Thread Walmes Zeviani
Using just nls() you can set the complete model and the alternative model in this way da - expand.grid(x=20:50, trat=c(0.9,1)) da$y - 10*da$trat*da$x/(12+da$x)+rnorm(da$x,0,0.1) plot(y~x, da) da$trat - as.factor(da$trat) n0 - nls(y~A[trat]*x/(B[trat]+x), data=da, start=list(A=c(9,10),

[R] Odp: save data to an R object

2010-03-17 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 17.03.2010 11:56:45: Dear R people, Is it possible to save three data sets in an R object and to call each data from this object independently! ?list Regards Petr Regards, Cheba [[alternative HTML version deleted]]

[R] mmap error-12, macbook pro

2010-03-17 Thread Mamun
Dear List, I am trying to read some files using read.csv and total size of those files are 3.99 GB. I am using MacBook Pro with 4GB RAM(snow leopard). I also tried to run a chunk from those files and altogether the size was 1.33 GB. But every time I was getting the following error R(1200)

[R] mmap error-12, macbook pro

2010-03-17 Thread Mamun
Hi, I am trying to read some files using read.csv and total size of those files are 3.99 GB. I am using MacBook Pro with 4GB RAM(snow leopard). I also tried to run a chunk from those files and altogether the size was 1.33 GB. But every time I was getting the following error R(1200) malloc: ***

[R] mmap error, macbook pro

2010-03-17 Thread shyama
Hi, I am trying to read some files using read.csv and total size of those files are 3.99 GB. I am using MacBook Pro with 4GB RAM(snow leopard). I also tried to run a chunk from those files and altogether the size was 1.33 GB. But every time I was getting the following error R(1200) malloc: ***

[R] accessing info in object slots from listed objects using loops

2010-03-17 Thread torgrims
Hey, I have stacked a couple of garchFit objects in a list with names $fit1, $fit2, ..., $fiti assigning objects names using a loop, i.e. after running the loop modelStack = list($fit1, $fit2,...,$fiti). Thus the following apply; a = modelStack$fit2, then a is the second garchFit object of

Re: [R] Missing index in vector assignment

2010-03-17 Thread Chaehan So
Jim Petr, Thank you for your hint - I am really grateful, because they helped me to get one step further, and although now the problem lies somewhere else, you encouraged that we can find the solution soon! 1. To Petr's comments Petr, your hint to define y: y - LVvar[,1, drop=FALSE] did solve

Re: [R] Constrained non linear regression using ML

2010-03-17 Thread Gabor Grothendieck
Try it anyways -- maybe none of your constraints are active. On Wed, Mar 17, 2010 at 6:01 AM, Corrado ct...@york.ac.uk wrote: Dear Gabor, dear R users, I had already read the betareg documentation. As far as I can understand from the help, it does not allow for constrained regression.

[R] Antw: odfWeave Error

2010-03-17 Thread Frank Bloos
Hi, I am using 7-zip for unzipping (http://www.7-zip.org/). Then odfWeaveControl needs to be set to odfWeaveControl(zipCmd=c(c:/programme/7-zip/7z a -tzip $$file$$,c:/programme/7-zip/7z x $$file$$ -aoa)) - control where 'c:/programme/7-zip/' is the path to my 7-zip installation. You can

Re: [R] Are loops handled differently in newer versions of R?

2010-03-17 Thread Michael Rennie
Thanks everyone for your assistance with this! Very much appreciated, and the students of my statistics course will also be pleased to have a fix ;) Mike Don MacQueen wrote: Joshua's explanation of rownames makes a lot more sense than my speculation about conversion to numeric. Rownames of

[R] Is there any R package that can find the maxima of a 1-D time series

2010-03-17 Thread mauede
Is there any R package that can help me with digging out the maxima of a 1-D trajectory ? I have 975 1-D curves. They are only known as time series. That is a set of points ordered with respect to time. Some curves exhibit one only peak. Others have two peaks of different height. We wish to

Re: [R] define F-ratio computations with aov

2010-03-17 Thread Michael Rennie
Howdy, In the past, I've just run the ANOVA as normal, and then just grabbed the appropriate MS for the estimation of F ratios. Eg, this will get you the MS in your anova object: summary(obj.aov)[[1]][3] or summary(obj.aov)$Mean And if you want a specific MS,

Re: [R] accessing info in object slots from listed objects using loops

2010-03-17 Thread Henrique Dallazuanna
Try this: sapply(modelStack, slot, 'fit')['coef',] On Wed, Mar 17, 2010 at 7:11 AM, torgrims torgr...@stud.ntnu.no wrote: Hey, I have stacked a couple of garchFit objects in a list with names $fit1, $fit2, ..., $fiti assigning objects names using a loop, i.e. after running the loop

Re: [R] Constrained non linear regression using ML

2010-03-17 Thread Corrado
Dear Gabor, 1) The constraints are active, at least from a formal point view. 3) I have tried several times to run betareg.fit on the data, and the only thing I can obtain is the very strange error: Error in dimnames(x) - dn : length of 'dimnames' [2] not equal to array extent The error

Re: [R] Summing daily data for each year

2010-03-17 Thread Gabor Grothendieck
Try this. We read in the data using read.zoo and then aggregate it. read.zoo assumes Date class unless you indicate otherwise. Then we compute the year and aggregate over that. as.numeric(format(time(z), %Y)) would be an alternate way to compute the year. Lines - 1995-04-01 0.002766309

Re: [R] Constrained non linear regression using ML

2010-03-17 Thread Gabor Grothendieck
Contact the maintainer regarding problems with the package. Not sure if this is acceptable but if you get it to run you could consider just dropping the variables from your model that correspond to active constraints. Also try the maxLik package. You will have to define the likelihood yourself

Re: [R] How can I save the result for goodness of fit test

2010-03-17 Thread Michael Friendly
pinusan wrote: Dear All, I run the goodness of fit test using goodfit() in vcd package. The result is as follow: Goodness-of-fit test for poisson distribution X^2 df P( X^2) Pearson 1.053348 2 0.5905661 Warning message: In summary.goodfit(gf) : Chi-squared

Re: [R] Missing index in vector assignment

2010-03-17 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 17.03.2010 13:04:05: Jim Petr, Thank you for your hint - I am really grateful, because they helped me to get one step further, and although now the problem lies somewhere else, you encouraged that we can find the solution soon! 1. To Petr's

Re: [R] Constrained non linear regression using ML

2010-03-17 Thread Arne Henningsen
On 17 March 2010 14:22, Gabor Grothendieck ggrothendi...@gmail.com wrote: Contact the maintainer regarding problems with the package.  Not sure if this is acceptable but if you get it to run you could consider just dropping the variables from your model that correspond to active constraints.

Re: [R] plm within models: is the correct F-statistic reported?

2010-03-17 Thread Liviu Andronic
Dear Achim On 3/16/10, Achim Zeileis achim.zeil...@uibk.ac.at wrote: Hence, when saying summary() different models with no effects are assumed. For gr_fe the model without effects just omits value/capital but keeps the firm-specific interecepts. For gr_lm not even the intercept is kept in

Re: [R] Is there any R package that can find the maxima of a 1-D

2010-03-17 Thread Ted Harding
On 17-Mar-10 12:31:43, mau...@alice.it wrote: Is there any R package that can help me with digging out the maxima of a 1-D trajectory ? I have 975 1-D curves. They are only known as time series. That is a set of points ordered with respect to time. Some curves exhibit one only peak. We

Re: [R] Constrained non linear regression using ML

2010-03-17 Thread Corrado
Dear Arne, Gabor, I solved the problem with betareg (downloaded the package). I run it on my data, and unfortunately the constraint is definitively active, if I remove the active variables, I then remove the most significant variables! Of course the error is important, not the distribution

Re: [R] define F-ratio computations with aov

2010-03-17 Thread RICHARD M. HEIBERGER
Please look at the Error term in ?aov On Wed, Mar 17, 2010 at 4:25 AM, Galanidis Alexandros a...@env.aegean.grwrote: Greetings to all, This is my model: aov.fit-aov(Y~A+B+C+D+E+A:C+A:E) In summary(aov.fit) all F values are comptuted by eg MS(A)/MS(Residuals). This is not correct (or what I

[R] Odp: Adding minutes to 24 hour time

2010-03-17 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 17.03.2010 14:57:32: Hi, Does anyone know how to add minutes (up to 100 min) to a 24 hour time, to create a new 24 hour time? I can't seem to find any documentation or examples explaining how to do this. The variables of interest are

Re: [R] Adding minutes to 24 hour time

2010-03-17 Thread Gustaf Rydevik
On Wed, Mar 17, 2010 at 2:57 PM, Hosack, Michael mhos...@state.pa.us wrote: Hi, Does anyone know how to add minutes (up to 100 min) to a 24 hour time, to create a new 24 hour time? I can't seem to find any documentation or examples explaining how to do this. The variables of interest are

Re: [R] Missing index in vector assignment

2010-03-17 Thread Chaehan So
Petr - your suggestion WORKS! Thank you so much, really! happy-Chaehan On Wed, Mar 17, 2010 at 2:22 PM, Petr PIKAL petr.pi...@precheza.cz wrote: Hi r-help-boun...@r-project.org napsal dne 17.03.2010 13:04:05: Jim Petr, Thank you for your hint - I am really grateful, because they

Re: [R] Constrained non linear regression using ML

2010-03-17 Thread Gabor Grothendieck
For specific questions on the betareg package contact the maintainer. If the likelihood based approaches are giving too much difficulty try moving to a Bayesian framework (WinBUGS/R2WinBUGS, JAGS/r2jags, etc.) On Wed, Mar 17, 2010 at 10:03 AM, Corrado ct...@york.ac.uk wrote: Dear Arne, Gabor,

[R] [R-pkgs] haarfisz

2010-03-17 Thread Guy Nason
Dear all, The package haarfisz, for computing Haar-Fisz variance stabilization transforms for Poisson-like data has just been submitted to CRAN. This was previously bundled with wavethresh, but has now been unbundled. Best wishes, Guy Nason ___

Re: [R] odfWeave Error

2010-03-17 Thread Btibert3
Thanks for your help! Here is what I tried with no luck. I use 7-zip on my machine. Just in case it helps, I am running XP Pro 32 at the office. odfctrl - odfWeaveControl(zipCmd = c(C:/Program Files/7-Zip/7zG.exe -r $$file$$ ., C:/Program Files/7-Zip/7zG.exe -o $$file$$))

[R] Converting factors to numeric in a dataframe

2010-03-17 Thread Michael Glanville
I am currently trying to write a program that minimises the amount of work required for “auditable” qPCR data. At the moment I am using an Excel (.csv) spreadsheet as source data that has been transposed to the column format required for R to read. Unfortunately, this means I have* *to manually

[R] [R-pkgs] waveband

2010-03-17 Thread Guy Nason
Dear all, The package waveband, for computing wavelet shrinkage credible intervals, has been uploaded to CRAN. This was previously bundled with wavethresh, but has now been unbundled. Best wishes, Guy Nason -- Professor Guy Nason Head of Department Department of

[R] mmap error on macbook pro

2010-03-17 Thread Shyamasree Saha [shs]
Dear List, I am trying to read some files using read.csv and total size of those files are 3.99 GB. I am using MacBook Pro with 4GB RAM(snow leopard). I also tried to run a chunk from those files and altogether the size was 1.33 GB. But every time I was getting the following error R(1200)

[R] [R-pkgs] wavethresh

2010-03-17 Thread Guy Nason
Dear all, A new version of wavethresh has just been submitted to CRAN. This is version 4.5 All best wishes, Guy Nason ___ R-packages mailing list r-packa...@r-project.org https://stat.ethz.ch/mailman/listinfo/r-packages

[R] How good is R at making publication quality tables?

2010-03-17 Thread Paul Miller
Hello Everyone,   I have just started learning R and am in the process of figuring out what it can and can't do. I must say I am very impressed with R so far and am amazed that something this good can actually be free.   Recently, I finished reading R for SAS and SPSS Users and have begun

Re: [R] odfWeave Error

2010-03-17 Thread Max Kuhn
Can you use 7zG to unzip an odt file from a dos prompt? Max On Wed, Mar 17, 2010 at 9:46 AM, Btibert3 btibe...@gmail.com wrote: Thanks for your help! Here is what I tried with no luck. I use 7-zip on my machine. Just in case it helps, I am running XP Pro 32 at the office. odfctrl -

Re: [R] Converting factors to numeric in a dataframe

2010-03-17 Thread Ivan Calandra
Hi! I don't really understand why you do pcrdata-as.data.frame(t(pcrdata)) Do you need to transpose the dataset? Because read.csv() creates a dataframe already. Something I found really useful recently is the package xlsReadWrite where the function read.xls() has an argument colClasses

[R] email id

2010-03-17 Thread makhdoomi
this is my mail id abraufs...@gmail.com [[alternative HTML version deleted]] __ 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

[R] question about multinom function (nnet)

2010-03-17 Thread Sergii Ivakhno
Dear All. I have the following table that I want to analyze using multinom function freq segments sample 4271 Seg1 tumour 4311 Seg2 tumour 3515 Seg1 normal 3561 Seg2 normal I want to compare model with both factors to the one where only sample is present.

Re: [R] Odp: boxplot, vertical position of x-axis labels

2010-03-17 Thread Kay Cichini
thanks a lot! both ways work. greetings - kay -- View this message in context: http://n4.nabble.com/boxplot-vertical-position-of-x-axis-labels-tp1594857p1596456.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

Re: [R] How good is R at making publication quality tables?

2010-03-17 Thread RICHARD M. HEIBERGER
Please look at the latex function in the Hmisc package. The default display is very good. And there are many optional arguments that give you very fine control over the appearance of the table. Rich [[alternative HTML version deleted]] __

Re: [R] Converting factors to numeric in a dataframe

2010-03-17 Thread RICHARD M. HEIBERGER
Why use a csv dataset as an intermediary? Use RExcel and get the dataset directly from your Excel source. See http://rcom.univie.ac.at for full details. You can download the RExcelInstaller package from CRAN with install.packages(RExcelInstaller) library(RExcelInstaller) installRExcel() Rich

[R] Odp: Converting factors to numeric in a dataframe

2010-03-17 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 17.03.2010 15:23:34: I am currently trying to write a program that minimises the amount of work required for “auditable” qPCR data. At the moment I am using an Excel (.csv) spreadsheet as source data that has been transposed to the column format

[R] Using nrow with summaryBy

2010-03-17 Thread Tony Laidig
Hello Everyone- I'm calculating summary statistics on a dataset (~4000 records, observations are not uniformly distributed) using summaryBy and trying to add a column with the number of observations to the output as well. What occurs to me is to use nrow(), but this doesn't appear to be working

Re: [R] How good is R at making publication quality tables?

2010-03-17 Thread Erik Iverson
Paul Miller wrote: Hello Everyone, I have just started learning R and am in the process of figuring out what it can and can't do. I must say I am very impressed with R so far and am amazed that something this good can actually be free. Recently, I finished reading R for SAS and SPSS Users

[R] Adding minutes to 24 hour time

2010-03-17 Thread Hosack, Michael
Thank you Gustaf for your help! It worked perfectly. Now I just need to figure out how you did it. Petr, thank you for assisting me, but I could not get your approach to work. Mike __ R-help@r-project.org mailing list

Re: [R] save data to an R object

2010-03-17 Thread cheba meier
Yes, that was very useful, thank you, Cheba 2010/3/17 Ivan Calandra ivan.calan...@uni-hamburg.de Hi, Here is one option: #some sample dataframes df1 - data.frame(letter=letters[1:3], number=1:3) df1 - data.frame(letter=letters[4:6], number=4:6) #save the dataframes save(df1, df2,

Re: [R] How good is R at making publication quality tables?

2010-03-17 Thread Ista Zahn
Hi Paul, For instructions and examples using the Hmisc latex() function you might want to take a look at http://lib.stat.cmu.edu/S/Harrell/doc/summary.pdf. -Best, Ista On Wed, Mar 17, 2010 at 10:51 AM, Paul Miller pjmiller...@yahoo.com wrote: Hello Everyone, I have just started learning R and

Re: [R] How good is R at making publication quality tables?

2010-03-17 Thread Douglas Bates
On Wed, Mar 17, 2010 at 10:25 AM, Erik Iverson er...@ccbr.umn.edu wrote: Paul Miller wrote: Hello Everyone, I have just started learning R and am in the process of figuring out what it can and can't do. I must say I am very impressed with R so far and am amazed that something this good

Re: [R] Using nrow with summaryBy

2010-03-17 Thread David Winsemius
On Mar 17, 2010, at 11:23 AM, Tony Laidig wrote: Hello Everyone- I'm calculating summary statistics on a dataset (~4000 records, observations are not uniformly distributed) using summaryBy and trying to add a column with the number of observations to the output as well. What occurs to me is to

Re: [R] How good is R at making publication quality tables?

2010-03-17 Thread Liviu Andronic
On Wed, Mar 17, 2010 at 2:51 PM, Paul Miller pjmiller...@yahoo.com wrote: Am I right or wrong about this? If I am wrong, can anyone show me some examples of how R can be used to create really nice looking tables? I often make tables of adverse events in clinical trials that have n(%) values

Re: [R] Why eval(parse(text=var(vec))) return a matrix but NOT a number?

2010-03-17 Thread Charles C. Berry
On Wed, 17 Mar 2010, Yong Wang wrote: Dear List I am getting a problem when using eval(parse). Code below sketchs what I am trying to do: For each row of a N*K dataframe (I use a 2*2 dataframe in the example below), applying a number of functions and get the outputs (two functions, sum and

Re: [R] Using nrow with summaryBy

2010-03-17 Thread Ivan Calandra
Hi David, I have probably 2 stupid questions regarding what you said but it might be important to understand: - why nrow() would not make sens for a subsetted vector? On the help page of nrow(), it's written that we can apply it on a vector, array or dataframe (basically everything...?). So

Re: [R] Using nrow with summaryBy

2010-03-17 Thread David Winsemius
On Mar 17, 2010, at 12:10 PM, Ivan Calandra wrote: Hi David, I have probably 2 stupid questions regarding what you said but it might be important to understand: - why nrow() would not make sens for a subsetted vector? On the help page of nrow(), it's written that we can apply it on a

[R] Writing dataframes to SAS XPT format

2010-03-17 Thread Dennis Fisher
Colleagues, On occasion, I need to output an R dataframe to a file in SAS XPT format. Although the foreign package supports reading of XPT files and writing to a format that SAS can read, it does not support writing to XPT format (confirmed with Thomas Lumley, the author of write.foreign).

Re: [R] mmap error-12, macbook pro

2010-03-17 Thread Thomas Lumley
There seem to have been three almost identical reports of this from three different email addresses, including two widely-separate UK academic institutions, and two user names, which is a bit weird. However: R will need more than 4GB memory to handle a 3.99GB file, and probably more than

Re: [R] Retrieving latitude and longitude via Google Maps API

2010-03-17 Thread Greg Snow
You may want to look at http://www.openstreetmap.org/ or http://maps.cloudmade.com/ instead of google maps. I don't know if they give the same detail/searches, but open source sites tend to be easier to work with and have fewer restrictions on use. While I like the google maps, I tend to not

Re: [R] plm within models: is the correct F-statistic reported?

2010-03-17 Thread Achim Zeileis
On Wed, 17 Mar 2010, Liviu Andronic wrote: Dear Achim On 3/16/10, Achim Zeileis achim.zeil...@uibk.ac.at wrote: Hence, when saying summary() different models with no effects are assumed. For gr_fe the model without effects just omits value/capital but keeps the firm-specific interecepts. For

Re: [R] Writing dataframes to SAS XPT format

2010-03-17 Thread Tobias Verbeke
Dennis Fisher wrote: Colleagues, On occasion, I need to output an R dataframe to a file in SAS XPT format. Although the foreign package supports reading of XPT files and writing to a format that SAS can read, it does not support writing to XPT format (confirmed with Thomas Lumley, the

Re: [R] replace NA value with 0

2010-03-17 Thread ehux
Building on the question how to replace NA with 0. My data set below has date, station 1, flags for station 1, station 2, flags for station 2, etc... I would like to make the values in the station columns equal to 1 and the NA in the station columns equal to 0 and then sum each row for the

Re: [R] How good is R at making publication quality tables?

2010-03-17 Thread Erich Neuwirth
If you are working in Windows and want Word output, it might be worthwhile to have a look at SWord available from the download section on rcom.univie.ac.at. Warning: the program is free for noncommercial use, but NOT licensed under GPL or LGPL. On 3/17/2010 3:51 PM, Paul Miller wrote: Hello

Re: [R] Odp: Loop overwrite and data output problems

2010-03-17 Thread RCulloch
Hi Petr, Thanks again!!! model is a list. So your suggestion: mod - matrix(NA, 1000, ncols) doesn't work. I thought that do.call and rbind would be the best for these data? Cheers, Ross -- View this message in context:

Re: [R] Using nrow with summaryBy

2010-03-17 Thread Gabor Grothendieck
Use NROW rather than nrow. On Wed, Mar 17, 2010 at 11:23 AM, Tony Laidig c...@mit.edu wrote: Hello Everyone- I'm calculating summary statistics on a dataset (~4000 records, observations are not uniformly distributed) using summaryBy and trying to add a column with the number of observations

Re: [R] How good is R at making publication quality tables?

2010-03-17 Thread Muenchen, Robert A (Bob)
Hi Paul, Sorry I didn't get to that subject in the first edition of R for SAS and SPSS Users. Several of the options people have mentioned will be in the second edition, although that's about a year off. I did get them added to R for Stata Users, due out in early April. Cheers, Bob

Re: [R] plm within models: is the correct F-statistic reported?

2010-03-17 Thread Liviu Andronic
On 3/17/10, Achim Zeileis achim.zeil...@uibk.ac.at wrote: Here, you compare apples and oranges. gr_fe1 is of class plm and gr_fe1_null is of class lm. This does not fly. gr_fe1_lm - lm(invest ~ 0 + value + capital + firm + year, data = pgr) anova(gr_fe1_lm, gr_fe1_null) which does the

[R] Retaining variable name in a function

2010-03-17 Thread AC Del Re
Hi All, Im interested in creating a function that will convert a variable within a data.frame to a factor while retaining the original name (yes, I know that I can just: var -factor(var) but I need it as a function for other purposes). e.g.: # this was an attempt but fails. facts -

Re: [R] Retaining variable name in a function

2010-03-17 Thread Sarah Goslee
How about this? It changes a column to a factor, and optionally renames it. facts - function(meta, mod, newmodname) { meta[,mod] - factor(meta[,mod]) if(!missing(newmodname)) { colnames(meta)[colnames(meta) == mod] - newmodname } meta } testdata - data.frame(a=c(1,2,3),

  1   2   >