Re: [R] Gamma distribution parameter estimation

2011-08-07 Thread Prof Brian Ripley
Well, 'Alexander Engelhardt' failed to follow the posting guide, and so did not get a reply from some knowledgeable people. (1) When using fitdistr you need to roughly scale your data: e.g. divide by 1000 here. (2) fitdistr does 'go down the maximum likeilhood route' and it does find

Re: [R] Dichotomous variables

2011-08-07 Thread marco
Hi Sarah, sorry for the lack of details..hope now my dilemma will be clearer: so, I have my dataset, represented by a matrix:100 subjects and 20 variables, expressed as 1(presence) and 0 (absence) I then tried to obtain a dissimilarity m. using the jaccard() command. To perform a NMDS, I used the

[R] Fitting t copula

2011-08-07 Thread poulomi
I'm a new user of R and a novice user in copula R package. I want to fit 3-dimensional t copula for my trivariate data. So I used the command t.cop - tCopula(c(0.785,0.283,0.613),dim=3,dispstr=un,df=6,df.fixed = TRUE) where c(0.785,0.283,0.613) is the correlation pattern of my data with 0.785

Re: [R] Sweave - landscape figure

2011-08-07 Thread Eduardo Mendes
Hello I think you are right. Includegraphics outside od R chunck seems to avoid unnecessary float space. Many thanks Ed. On Sat, Aug 6, 2011 at 10:18 PM, Duncan Mackay mac...@northnet.com.auwrote: Hi Eduardo I have just realized that I did not my send previous message to r-help You do

Re: [R] Question on RNG

2011-08-07 Thread Petr Savicky
On Sat, Aug 06, 2011 at 09:37:22PM +0200, Petr Savicky wrote: On Fri, Aug 05, 2011 at 11:47:49PM +0530, Ron Michael wrote: Hi all, I have happened to work on MS .NET for sometime now, and I found that this language offers RNG what is called as Donald E. Knuth's subtractive random number

[R] help annotating plot.xmean.ordinaly in rms package

2011-08-07 Thread Christopher DiBari
Hello List: Does anyone know if there's a way to annotate the plots produced by the plot.xmean.ordinaly function in the rms package. I'd like to produce publication quality figures, but first need to annotate the axis labels. Is there a way to do that? I appreciate any advice. Chris

Re: [R] help annotating plot.xmean.ordinaly in rms package

2011-08-07 Thread Frank Harrell
Chris for my purposes I need the output tied to the model's variable names, so I'm not sure I want to add new naming options to the function. You might just add a line after nam - nam[-1] to specify your vector of names, starting with the response variable, e.g., nam - c('velocity

Re: [R] help annotating plot.xmean.ordinaly in rms package

2011-08-07 Thread David Winsemius
On Aug 7, 2011, at 8:24 AM, Christopher DiBari wrote: Hello List: Does anyone know if there's a way to annotate the plots produced by the plot.xmean.ordinaly function in the rms package. I'd like to produce publication quality figures, but first need to annotate the axis labels. Is

[R] useR!2012 Nashville TN: Your Input Needed

2011-08-07 Thread Frank Harrell
Dear R and S-Plus Community: The 2012 R User Conference - useR!2012 - will be held in Nashville Tennessee USA, June 12-15, 2012 on the campus of Vanderbilt University. We would like to begin estimating the number of attendees, their area of interest, and the number seeking hotel vs.

Re: [R] How to extract sublist from a list?

2011-08-07 Thread Joshua Wiley
Hi Richard, Sorry for the delay, I had stopped tracking this conversation (the more interesting question, though is what was I searching for in my gmail archives that lead me to see this and notice your followup email...). Anyway, Michael is correct about what is going on. One aspect that might

Re: [R] significance of differences in skew and kurtosis between two groups

2011-08-07 Thread David Winsemius
On Aug 6, 2011, at 1:19 PM, Timothy Bates wrote: Dear R-users, I am comparing differences in variance, skew, and kurtosis between two groups. For variance the comparison is easy: just var.test(group1, group2) I am using agostino.test() for skew, and anscombe.test() for kurtosis.

[R] Printing data frame with million rows

2011-08-07 Thread Bansal, Vikas
Dear all, I was working on number of files and at the end I got a data frame with approx. million rows.To prin this data frame in output, I used capture.output(print.data.frame(end,row.names=F), file = summary, append = FALSE) where end is the name of my data frame and summary is the name of

Re: [R] significance of differences in skew and kurtosis between two groups

2011-08-07 Thread peter dalgaard
On Aug 7, 2011, at 20:05 , David Winsemius wrote: On Aug 6, 2011, at 1:19 PM, Timothy Bates wrote: Dear R-users, I am comparing differences in variance, skew, and kurtosis between two groups. For variance the comparison is easy: just var.test(group1, group2) I am using

Re: [R] Printing data frame with million rows

2011-08-07 Thread David Winsemius
On Aug 7, 2011, at 2:08 PM, Bansal, Vikas wrote: Dear all, I was working on number of files and at the end I got a data frame with approx. million rows.To prin this data frame in output, I used capture.output(print.data.frame(end,row.names=F), file = summary, append = FALSE) where end

Re: [R] Printing data frame with million rows

2011-08-07 Thread Joshua Wiley
Hi Vikas, See ?print.default and ?options Your options are to set max.print in options higher or manually pass a max value to print. I'm not sure if it will let you print a million rows---print is typically used for output meant for the user and (again typically) users do not read through a

Re: [R] Printing data frame with million rows

2011-08-07 Thread Jorge Ivan Velez
?write.table HTH, Jorge On Sun, Aug 7, 2011 at 2:08 PM, Bansal, Vikas wrote: Dear all, I was working on number of files and at the end I got a data frame with approx. million rows.To prin this data frame in output, I used capture.output(print.data.frame(end,row.names=F), file = summary,

Re: [R] significance of differences in skew and kurtosis between two groups

2011-08-07 Thread Timothy Bates
Many thanks Peter and David, Jorge Ivan Velez gave me just what Peter suggests: a resampling solutionÂ… which is perfect. I was surprised this is not available as a packaged and documented test: perhaps an opportunity for a helpful paper for someone enterprising. Best, tim On Aug 7, 2011, at

Re: [R] Printing data frame with million rows

2011-08-07 Thread peter dalgaard
On Aug 7, 2011, at 20:27 , David Winsemius wrote: On Aug 7, 2011, at 2:08 PM, Bansal, Vikas wrote: Dear all, I was working on number of files and at the end I got a data frame with approx. million rows.To prin this data frame in output, I used

Re: [R] integral depending on a parameter

2011-08-07 Thread Carl Witthoft
Just chiming in here... Granted some of the help files are a bit cryptic until you get used to them (but still much easier to understand than the Unix man pages :-) ). This sort of thing does provide a chance to learn about the power of R. From Rolf's example, suppose that integrate() did

Re: [R] Printing data frame with million rows

2011-08-07 Thread David Winsemius
On Aug 7, 2011, at 2:37 PM, peter dalgaard wrote: On Aug 7, 2011, at 20:27 , David Winsemius wrote: On Aug 7, 2011, at 2:08 PM, Bansal, Vikas wrote: Dear all, I was working on number of files and at the end I got a data frame with approx. million rows.To prin this data frame in

Re: [R] Printing data frame with million rows

2011-08-07 Thread Bansal, Vikas
Dear all, Thanks to everyone.I tried both the methods and it is working. Thanking you, Warm Regards Vikas Bansal Msc Bioinformatics Kings College London From: David Winsemius [dwinsem...@comcast.net] Sent: Sunday, August 07, 2011 8:31 PM To: peter

[R] Removing funny characters from a column of a data frame

2011-08-07 Thread Bansal, Vikas
Dear all, The 5th column of my data frame is like this- .$.$.$.$.$,$,$...,.,,.,,....,,,,,T...,,,.,,,...,, ,..,,,...,,,..,,..,,,,,,.,,...G....,,.,, ,t.,,c,,.a.,,,.A,,,...,..,,,.,,,,...,,,$

Re: [R] Removing funny characters from a column of a data frame

2011-08-07 Thread Joshua Wiley
Hi Vikas, You're overworking yourself here, gsub is vectorized! df$V5 - gsub([^AaCcGgTt\\.,], , df$V5) This will be *substantially* faster than looping (using apply) over every row of your data frame, since you just care about the 5th column anyways. Also, I switched your regexp for one that

[R] reshape::rename package unable to install !?!

2011-08-07 Thread Matt Curcio
Greetings all, I have been working with RStudio and R only for a little while. I came across a package called 'reshape' that helped me 'rename' columns. Unfortunately, my computer got hosed (too much playing with linux too late at nite) and I had to re-install everything, BUT when I tried to

Re: [R] Gamma distribution parameter estimation

2011-08-07 Thread J. R. M. Hosking
On 2011-08-06 15:14, Alexander Engelhardt wrote: Hey, I have a set of income data which I'd like to fit to a gamma distribution. How can I estimate the two parameters of the gamma distribution for a vector, e.g. c(2039L, 2088L, 5966L, 2353L, 1966L, 2312L, 3305L, 2013L, 3376L, 3363L, 3567L,

[R] Anyone free to take a data format question for Reshape2?

2011-08-07 Thread Bruce Miller
I need to reformat long data into a wide format (matrix for another program) but it does not seem straight forward. Can not seem to get it to work since some data elements are strings. Anyone have time to look at the issue? Tnx Bruce -- Bruce W. Miller, Ph.D. Conservation Ecologist

Re: [R] trouble with uninstall

2011-08-07 Thread marktab
Hello I had the same problem today. Error Message: This Installation can only be uninstalled on 64-bit Windows. Computer System: Windows 7 Enterprise SP1 32-bit R Version attempted: R 2.13.1 (installed as part of the R and Friends package from http://rcom.univie.ac.at/download.html) I have

Re: [R] Anyone free to take a data format question for Reshape2?

2011-08-07 Thread jim holtman
Can you provide some sample data and show what you expect? On Sun, Aug 7, 2011 at 4:32 PM, Bruce Miller batsnc...@gmail.com wrote: I need to reformat long data into a wide format (matrix for another program) but it does not seem straight forward. Can not seem to get it to work since some data

Re: [R] trouble with uninstall

2011-08-07 Thread Joshua Wiley
Hi Mark, I do not have any XP or 32 bit systems lying around to try out anymore, but I have R 2.13.1 running just fine on two Win 7 x64 systems. Have you tried downloading it again and reinstalling? My antivirus has an unwelcomed predilection to remove R.dll which causes havoc unless I set a

Re: [R] reshape::rename package unable to install !?!

2011-08-07 Thread Joshua Wiley
Hi Matt, You have not provided us nearly enough information to provide meaningful feedback. You say your computer got, 'hosed'. Have you managed to reinstall R? If so, what version are you running? Can you install other R packages? What is your current OS? Still linux? What flavour? How

Re: [R] Very silent R

2011-08-07 Thread khadeeja ismail
Thanks to all who emailed me regarding my problem. options(show.error.messages=TRUE) seems to work now, so as one of you pointed out I suspect a problem with my system. Regrds, Hajja Hi r-help-boun...@r-project.org napsal dne 05.08.2011 15:21:34: khadeeja ismail haj...@yahoo.com Odeslal:

Re: [R] integral depending on a parameter

2011-08-07 Thread peter dalgaard
On Aug 7, 2011, at 21:25 , Carl Witthoft wrote: Just chiming in here... Granted some of the help files are a bit cryptic until you get used to them (but still much easier to understand than the Unix man pages :-) ). This sort of thing does provide a chance to learn about the power of R.

Re: [R] Printing data frame with million rows

2011-08-07 Thread peter dalgaard
On Aug 7, 2011, at 21:31 , David Winsemius wrote: On Aug 7, 2011, at 2:37 PM, peter dalgaard wrote: On Aug 7, 2011, at 20:27 , David Winsemius wrote: On Aug 7, 2011, at 2:08 PM, Bansal, Vikas wrote: Dear all, I was working on number of files and at the end I got a data frame

Re: [R] Very silent R

2011-08-07 Thread Liviu Andronic
On Fri, Aug 5, 2011 at 3:54 PM, khadeeja ismail haj...@yahoo.com wrote: other attached packages: [1] Rcmdr_1.6-2 I bet that this is what generates the lack of error messages. Check Rcmdr documentation on how to turn it off. Liviu __

Re: [R] trouble with uninstall

2011-08-07 Thread Neuwirth Erich
The statconn-RExcel project (RAndFriends is available as service from this project) has its own mailing list. Subscription is possible at the web site you mentioned. If you think your problem is caused by the RAndFriendsSetup, please subscribe to the mailing list and report your problems there.

Re: [R] Gamma distribution parameter estimation

2011-08-07 Thread Rolf Turner
Neither Ted Harding's post, nor Prof. Ripley's, really appear to address the OP's follow-up question which was *why* did he get the ``weird error'' (non-finite finite difference, NaNs produced) when he applied fitdistr(), as he was advised to do by Jorge Ivan Velez. The ``weird error'' did

[R] Creating a scatterplot with sequential dates on x-axis?

2011-08-07 Thread Caitlin
Hi all. I need to plot 30 values and I'd like the x-axis to have 30 dates values, e.g., 5/1/2011, 5/2/2011, etc. so an observer could see how the values correspond as the month progresses. Is there a convenient function I could use? I considered creating two vectors, x and y, then simply

Re: [R] Creating a scatterplot with sequential dates on x-axis?

2011-08-07 Thread Joshua Wiley
Hi Caitlin, Here are a couple of options for you: plot(x = seq(from = as.Date(2011-05-01), to = as.Date(2011-05-30), by = day), y = cumsum(runif(30))) ## using a bit of a shortcut plot(x = as.Date(2011-05-01) + 0:29, y = cumsum(runif(30))) Does that do what you want? Josh On Sun,

[R] heavy processing during R_init_XXXXX()

2011-08-07 Thread Alexandre Aguiar
Hi. Need some advice. I have to load a library during R_init_X() with dlopen(). The library file is 23 megabytes long and loads several other libraries. Everything happens during dlopen() execution, out of control, and takes around 1 second on first load in a quadcore. Besides, due to

Re: [R] Creating a scatterplot with sequential dates on x-axis?

2011-08-07 Thread Duncan Mackay
Try library(lattice) x = seq(from = as.Date(2011-01-01), by = 1 month, length = 10) y = rnorm(10) xyplot(y~x) ?xyplot ?seq Regards Duncan Duncan Mackay Department of Agronomy and Soil Science University of New England ARMIDALE NSW 2351 Email: home mac...@northnet.com.au At 10:00 08/08/2011,

[R] RODBC: sqlUpdate doesn't handle properly POSIXct field?

2011-08-07 Thread Mikhail Titov
Hello all! Can someone confirm whether there is a bug or not? I was trying to use sqlUpdate in place of sqlSave as data set I import has duplications. However I get errors while using fast=FALSE argument to safely update/ignore duplicates: Error while executing the query[RODBC]

Re: [R] Printing data frame with million rows

2011-08-07 Thread David Winsemius
On Aug 7, 2011, at 5:51 PM, peter dalgaard wrote: On Aug 7, 2011, at 21:31 , David Winsemius wrote: On Aug 7, 2011, at 2:37 PM, peter dalgaard wrote: On Aug 7, 2011, at 20:27 , David Winsemius wrote: On Aug 7, 2011, at 2:08 PM, Bansal, Vikas wrote: Dear all, I was working on

Re: [R] RODBC: sqlUpdate doesn't handle properly POSIXct field?

2011-08-07 Thread Mikhail Titov
I apologize for the first e-mail as I didn't use plain text. Here is the full message. --8 --8-- Hello all! Can someone confirm whether there is a bug or not? I was trying to use sqlUpdate in place of sqlSave as data

Re: [R] RODBC: sqlUpdate doesn't handle properly POSIXct field?

2011-08-07 Thread Mikhail Titov
I've tried to upgrade to latest (?) http://cran.mtu.edu/bin/windows/contrib/2.12/RODBC_1.3-3.zip , but no luck. It looks like nothing is being escaped as I tried to use character class, but I got same error message. Mikhail -Original Message- From: r-help-boun...@r-project.org

Re: [R] heavy processing during R_init_XXXXX()

2011-08-07 Thread Duncan Murdoch
On 11-08-07 8:09 PM, Alexandre Aguiar wrote: Hi. Need some advice. I have to load a library during R_init_X() with dlopen(). The library file is 23 megabytes long and loads several other libraries. Everything happens during dlopen() execution, out of control, and takes around 1 second on

[R] Help on reshape2 data frame rearrangement

2011-08-07 Thread B Jessop
Dear help list: I am trying to reshape a data frame from long to wide format and with a reduced variable list using reshape2. The original data frame format is: Site Obs_no LengthSite 1 Obs 1 10Site 1 Obs 2 13Site 1 Obs 3 14.Site 2 Obs 1 5Site 2

Re: [R] Gamma distribution parameter estimation

2011-08-07 Thread Peter Ehlers
On 2011-08-07 16:57, Rolf Turner wrote: Neither Ted Harding's post, nor Prof. Ripley's, really appear to address the OP's follow-up question which was *why* did he get the ``weird error'' (non-finite finite difference, NaNs produced) when he applied fitdistr(), as he was advised to do by

Re: [R] Help on reshape2 data frame rearrangement

2011-08-07 Thread Joshua Wiley
Hi BJ, Suppose that your data set is called 'Data1', please copy and paste the output created by typing: dput(Data1[1:15, ]) and post that to the list ***in plain text*** (or upload a text file on some file hosting service). The email you sent is nearly impossible to parse because this is a

Re: [R] Gamma distribution parameter estimation

2011-08-07 Thread Rolf Turner
On 08/08/11 13:20, Peter Ehlers wrote: On 2011-08-07 16:57, Rolf Turner wrote: Neither Ted Harding's post, nor Prof. Ripley's, really appear to address the OP's follow-up question which was *why* did he get the ``weird error'' (non-finite finite difference, NaNs produced) when he applied

Re: [R] ridge regression - covariance matrices of ridge

2011-08-07 Thread Ravi Varadhan
Hi Michael, The coefficients of ridge regression are given by: \beta^* = (X'X + k I)^{-1} X' y, (1) where k 0 is the penalty parameter and I is the identity matrix. The ridge estimates are related to OLS estimates \beta as follows: \beta^* = Z \beta,

Re: [R] trouble with uninstall

2011-08-07 Thread Duncan Murdoch
On 11-07-25 4:50 PM, John Hangen wrote: Hello, Today I installed R for Windows version 2.13.1, but realized that it's not something that I need right now.I attempted to uninstall it, but am getting the following error message: A brute force uninstall is fairly easy: just delete the

[R] 2 questions on matrix manipulation in R

2011-08-07 Thread Lei Liu
Hi there, I have two questions on matrix manipulation. For the first one, I want to calculate the product of each column of a matrix (say A) with another vector (say b). That is, if A has 5 columns (a1, a2, a3, a4, a5), I want to obtain a matrix with columns (a1*b, a2*b, aA3*b, a4*b, a5*b).

Re: [R] 2 questions on matrix manipulation in R

2011-08-07 Thread Joshua Wiley
Hi Lei, Here are some examples. Look at the documentation for ?%*% ?%o% and ?[ with the drop = FALSE argument (in case you ever do select just one column/row of a matrix). ## your first A matrix (A - matrix(1:55, ncol = 5)) ## you were rather unclear what ## your b vectors dimensions were ##

[R] select from matrix

2011-08-07 Thread gallon li
Suppose I have a matrix like A=matrix(0,4,6) A[1,]=c(16,10,2,4,8,7) A[2,]=c(16,10,12,14,8,7) A[3,]=c(16,10,13,15,19,17) A[4,]=c(16,9,13,15,9,7) A [,1] [,2] [,3] [,4] [,5] [,6] [1,] 16 102487 [2,] 16 10 12 1487 [3,] 16 10 13 151917 [4,]

Re: [R] 2 questions on matrix manipulation in R

2011-08-07 Thread David Winsemius
On Aug 8, 2011, at 12:18 AM, Lei Liu wrote: Hi there, I have two questions on matrix manipulation. For the first one, I want to calculate the product of each column of a matrix (say A) with another vector (say b). That is, if A has 5 columns (a1, a2, a3, a4, a5), I want to obtain a