Re: [R] italic(mu)

2013-08-22 Thread David Winsemius
On Aug 20, 2013, at 3:04 PM, David Winsemius wrote: On Aug 20, 2013, at 12:06 PM, Beaulieu, Jake wrote: Hi, I would like to include the greek letter mu, in italics, in an axis title. The following gets close, but the mu isn't italicized. x - 1:10 y - 1:10 plot(y ~x, ylab =

Re: [R] Windows The system cannot find the path specified error when submitting R in batch mode

2013-08-22 Thread Tal Galili
Hello James, Does this answer your question: http://stackoverflow.com/questions/14956887/problems-executing-script-from-command-line-in-r-error-message-cannot-find-pat ? Contact Details:--- Contact me: tal.gal...@gmail.com |

[R] R-3.0.2 on September 25

2013-08-22 Thread peter dalgaard
Just a quick note, mainly to warn off maintainers of the recommended packages, that we intend to release R-3.0.2 on Wednesday, September 25. We'll be following the usual schedule from http://developer.r-project.org/release-checklist.html Notice in particular that new versions of recommended

Re: [R] stepAIC problem

2013-08-22 Thread Prof Brian Ripley
On 22/08/2013 09:24, Sachinthaka Abeywardana wrote: Hi all, I get the expected behaviour of getting a useful model if I do the following This is an 'expectation problem', not a 'stepAIC problem'. And stepAIC is not part of R and you are not crediting the tools you use. fit-lm(

Re: [R] download.file error - corrupt: Can't read SAT; charset=binary'

2013-08-22 Thread Uwe Ligges
Tal, please quote the whole message! I had to look for the original one now. And then I found that code was not reproducible for me: exe_URL = 'http://pandoc.googlecode.com/files/pandoc-1.11.1.msi' exe_filename - file.path(tempdir(), file.name.from.url(exe_URL)) Error in

[R] Error: cannot allocate vector of size 18.4 Gb (NbClust)

2013-08-22 Thread Ben Harrison
I have a 70363 x 5 double matrix that I am playing with. head(df) GR SP SN LN NEUT 1 1.458543 1.419946 -0.2928088 -0.2615358 -0.5565227 2 1.432041 1.418573 -0.2942713 -0.2634204 -0.5927334 3 1.406642 1.418226 -0.2958296 -0.2652920 -0.6267121 4 1.382284

Re: [R] Error: cannot allocate vector of size 18.4 Gb (NbClust)

2013-08-22 Thread Michael Weylandt
On Aug 22, 2013, at 7:39, Ben Harrison h...@student.unimelb.edu.au wrote: I have a 70363 x 5 double matrix that I am playing with. head(df) GR SP SN LN NEUT 1 1.458543 1.419946 -0.2928088 -0.2615358 -0.5565227 2 1.432041 1.418573 -0.2942713 -0.2634204

Re: [R] cross-sectional analysis of a financial time series

2013-08-22 Thread Joshua Ulrich
Below are two ways to accomplish this. The last() function will not pad with NA if you request more days than available, so you may need to handle that if it's an issue. I prefer the period.apply method because it keeps the data in an xts object, which I find easier to work with.

[R] From POSIXct to numeric and back with time zone

2013-08-22 Thread Daniel Haugstvedt
From POSIXct to numeric and back with time zone I am running regressions on data which has time series with different time resolution. Some data has hourly resolution, while most has either daily or weekly resolution. Aggregation is used to make the hourly data daily, while liner

Re: [R] Rexcel

2013-08-22 Thread Rui Barradas
Hello, I must tell you once again to address your questions to r-help@r-project.org And since there was no subject line, I've made up one. Your question seems to be a question about excel, and I really can't help you. Maybe someone else can. But if you write.table(etszP) can't you read that

Re: [R] italic(mu)

2013-08-22 Thread Beaulieu, Jake
This works: expression(paste('Greek', italic('\uo3bc')) thanks! Jake -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Thursday, August 22, 2013 2:01 AM To: David Winsemius Cc: Beaulieu, Jake; r-help@r-project.org Subject: Re: [R] italic(mu) On Aug 20,

[R] Usage of ETS R codes through RExcel macros in VBA

2013-08-22 Thread Siddharth
Issue: Usage of ETS R codes through RExcel macros in VBA Given below is my command code: Rinterface.runrcodefromrange Range(“Sheet1!B2:D8”) Following are the codes written in the given cell reference: #!rput zz 'Sheet1'!$B$2:$B$22 library(forecast) zz -

Re: [R] filtering out replicate (duplicate) observations under special conditions

2013-08-22 Thread arun
HI Samuel, Based on the output you wanted: (It would be better to use ?dput() to show the example dataset) dat1- structure(list(SiteID = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), SiteName = c(Big Platte Lake, Big Platte Lake, Big Platte Lake, Big Platte Lake, Big Platte

Re: [R] filtering out replicate (duplicate) observations under special conditions

2013-08-22 Thread arun
Hi, Also, you could use: library(data.table)  dt1- data.table(dat1,key=c('SampDate','DepthM')) unique(dt1) #   SiteID    SiteName   SampDate DepthM PDesc MAbbr Measure   DNU #1:  1 Big Platte Lake 2006-09-20  0.000    TP  Grab    6.58 FALSE #2:  1 Big Platte Lake 2006-09-20  2.286   

[R] corrgram (package corrgram): how to plot multiple correlograms in the same page?

2013-08-22 Thread Giuseppe Pagnoni
Hello, I am trying to plot a few correlograms on the same figure, with the function corrgram() from the package corrgram. However, the function does not seem to use the base graphic system, as setting out the multiple figure layout with, e.g., par(mfrow=c(2, 2,)) does not work. Does anybody

[R] converting a summary table to survey database form

2013-08-22 Thread Pancho Mulongeni
Hi! I am looking to choose a condom based on its pleasure score. I received some summarised data from 10 individuals: structure(list(Ramses = c(4, 4, 5, 5, 6, 3, 4, 4, 3, 4), Sheiks = c(5, 5, 6, 4, 7, 6, 4, 5, 6, 3), Trojans = c(7, 8, 7, 9, 6, 3, 2, 2, 2, 3), Unnamed = c(2, 1, 1, 3, 3, 4, 5, 4,

Re: [R] Rexcel

2013-08-22 Thread Jeff Newmiller
This is not on topic for this mailing list. See the Statconn website for support for RExcel. --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#.

Re: [R] Rexcel

2013-08-22 Thread Erich Neuwirth
Free support for RExcel is available by subscribing to the mailing list at rcom.univie.ac.at and posting questions to the list. On Aug 22, 2013, at 7:04 PM, Jeff Newmiller jdnew...@dcn.davis.ca.us wrote: This is not on topic for this mailing list. See the Statconn website for support for

Re: [R] download.file error - corrupt: Can't read SAT; charset=binary'

2013-08-22 Thread Tal Galili
Dear Uwe, Here is the updated code and error massage I get: exe_URL = 'http://pandoc.googlecode.com/files/pandoc-1.11.1.msi' exe_filename - file.path(tempdir(), basename(exe_URL)) download.file(exe_URL, destfile = exe_filename, mode = wb, method= internal) # ### Error massage: trying

[R] Close with a ggplot chart but need a little assistance

2013-08-22 Thread Walter Anderson
I have the following code and data data.csv ,Goal,Frequency,Weight,Group 1,Move,13,0.245283018867925,Public 2,Create,10,0.188679245283019,Public 3,Strengthen,30,0.566037735849057,Public 4,Move,6,0.6,Board 5,Create,0,0,Board 6,Strengthen,4,0.4,Board 7,Move,19,0.301587301587302,Total

[R] Quanteg problem in R

2013-08-22 Thread Garkuwa, Nuru Adamu
I used the codes below trying to fit a model at .95 c.i. of size relationship but it fails. library(quantreg) range(len$length) range(len$preyl) x-rq(len$preyl~len$length,tau=0.95) plot(x, type=b, xlab=length (cm),ylab=preyl (cm),ylim=c(5,35), xlim=c(10,100), data=len) Cheers, Nuru

Re: [R] download.file error - corrupt: Can't read SAT; charset=binary'

2013-08-22 Thread Tal Galili
Quick update - I think most of the problem is resolved. After more checks (following Uwe comments): 1) I see that the installer file runs properly when I set mode='wb', and fails when mode='w' (so that solves why some of the time the installer didn't run) 2) I still get the error massage mentioned

Re: [R] graph related question

2013-08-22 Thread David Carlson
It is not hard to create a basic function for that purpose: map.vec - function(x, y) { dfa - data.frame(a=x, x0=rep(1, length(x)), y0=length(x):1) dfamap - data.frame(a=y, x1=rep(2, length(y)), y1=length(y):1) vec - merge(dfa, dfamap, by=1)

[R] labcurve - use of putKey function

2013-08-22 Thread Igor Ribeiro
Dear all, I have a plot with two lines and I'm using labcurbe (package Hmisc) to show the legend. Everything works well, except that the line displayed in legend box should have same style (plotting character) as the line in the plot. This is achieved by pch parameter and looks like that it's only

[R] Rexcel macro query

2013-08-22 Thread Geddam Siddharth
*Issue:* Usage of ETS R codes through RExcel macros in VBA Given below is my command code: Rinterface.runrcodefromrange Range(“Sheet1!B2:D8”) Following are the codes written in the given cell reference: #!rput zz 'Sheet1'!$B$2:$B$22 library(forecast) zz -

[R] varpart

2013-08-22 Thread Sibylle Stöckli
Dear R-users I applied vegan's varpart function to partition the effects of explanatory matrices. Adj. R square for the unique fraction [a] is 0.25. Does anyone know why the decomposition by hand using rda gives me a different result for [a] (constrained proportion is 0.32)? I used

Re: [R] Quanteg problem in R

2013-08-22 Thread David Winsemius
On Aug 22, 2013, at 9:23 AM, Garkuwa, Nuru Adamu wrote: I used the codes below trying to fit a model at .95 c.i. of size relationship but it fails. library(quantreg) range(len$length) # [1] 28 98 range(len$preyl) x-rq(len$preyl~len$length,tau=0.95) plot(x, type=b, xlab=length

Re: [R] download.file error - corrupt: Can't read SAT; charset=binary'

2013-08-22 Thread Uwe Ligges
On 22.08.2013 19:52, Tal Galili wrote: Dear Uwe, Here is the updated code and error massage I get: exe_URL = 'http://pandoc.googlecode.com/files/pandoc-1.11.1.msi' exe_filename - file.path(tempdir(), basename(exe_URL)) download.file(exe_URL, destfile = exe_filename, mode = wb, method=

[R] Rcmdr version 2.0-0 now on CRAN

2013-08-22 Thread John Fox
Dear R-help list members, Version 2.0-0 of the Rcmdr package is now on CRAN and should appear presently on the various CRAN mirrors. As its number implies, this version represents a milestone in the development of the package, which first appeared on CRAN more than 10 years ago. The transition to

Re: [R] graph related question

2013-08-22 Thread Jim Lemon
On 08/23/2013 04:32 AM, Jie wrote: Dear All, I would like to draw a graph to illustrate the mapping between two vectors. For instance, a = c(2, 8, 5) ; mapped.a = c(8, 2, 5) I would like to get some picture as http://www.flickr.com/photos/96546690@N02/9569526581/ Basically, plot all points of

Re: [R] data import: strange experience

2013-08-22 Thread jwd
On Wed, 21 Aug 2013 10:35:53 -0400 SH empti...@gmail.com wrote: It looks like your problem has already been answered, however, as a rule of thumb anytime you see a peculiarity like this you should look for minor variations between what you expected to export and what Excel really exported as

Re: [R] how to code y~x/(x+a) in lm() function

2013-08-22 Thread Rolf Turner
I tried your suggestion on the toy example that was posted by David Carlson a while back: set.seed(42) x - 1:15 y - x/(1+x) + rnorm(15,0,0.02) I found that I had to: (a) Wrap the 1/x inside I(). (b) Set the offset term to be rep(1,length(x)). Bottom line: fit - glm(y ~

Re: [R] graph related question

2013-08-22 Thread David Winsemius
On Aug 22, 2013, at 4:17 PM, Jim Lemon wrote: On 08/23/2013 04:32 AM, Jie wrote: Dear All, I would like to draw a graph to illustrate the mapping between two vectors. For instance, a = c(2, 8, 5) ; mapped.a = c(8, 2, 5) I would like to get some picture as

Re: [R] Error: cannot allocate vector of size 18.4 Gb (NbClust)

2013-08-22 Thread Ben Harrison
On 22/08/13 21:57, Michael Weylandt wrote: On Aug 22, 2013, at 7:39, Ben Harrison h...@student.unimelb.edu.au wrote: No idea about the problem specifics but what are your OS and version of R? You might be limited there. I have 64-bit Ubuntu 12.04, R version 3.0.1. More likely,

[R] A couple of questions regarding the survival:::cch function

2013-08-22 Thread Ryung Kim
Dear all, I have a couple of questions regarding the survival:::cch function. 1) I notice that Prentice and Self-Prentice functions are giving identical standard errors (not by chance but by programming design) while their estimates are different. My guess is they are both using the

Re: [R] cross-sectional analysis of a financial time series

2013-08-22 Thread Brijesh Gulati
Hello Joshua: First of all, I thank you for the solution. The solution is quite elegant and concise. I have one follow-up question/comments. Everything seems ok but the problem comes if the last month stops somewhere in the middle of the month. For instance, if I run the data as of

[R] ANOVA nested model with random and fixed effects

2013-08-22 Thread Belyaeva Anna
Hello, I am confused with the design of experiment and I need your help. I study macroinvertebrates from 40 lakes. Each lake was sampled employing stratified random technique. Each lakes was divided into 3 different lake zones based on light penetration: near-shore area, transitional, and the

[R] A couple of questions regarding the survival:::cch function

2013-08-22 Thread Ryung Kim
Dear all, I have a couple of questions regarding the survival:::cch function. 1) I notice that Prentice and Self-Prentice functions are giving identical standard errors (not by chance but by programming design) while their beta estimates are different. My guess is they are both using

[R] how to use a column name from the data frame in the function

2013-08-22 Thread song song
for example I have data frame m as below: m=as.data.frame(outer(1:5,6:9)) colnames(m)=c('a','b','c','d') and I define the function myf=function(df, colname){ suppose colname is a, then: how can I get the column 'a' and how to get the colname as a string, 'a' } Thank you!

[R] how to use a column name from the data frame in the function

2013-08-22 Thread song song
m=as.data.frame(outer(1:5,6:9)) colnames(m)=c('a','b','c','d') tf=function(df, col){list(mean(eval(substitute(col),df,parent.frame())),col )} tf(m,a) will issue error: Error in tf(m, a) : object 'a' not found How can I replace the col as char 'a' in the function? Thank you

Re: [R] how to use a column name from the data frame in the function

2013-08-22 Thread Jeff Newmiller
Please don't post in HTML format... it messes with code examples. Use character indexing (please read the Introduction to R... again if necessary). myf - function(df, colname){ df[ ,colname ] } colname - a myf(m,colname) Until you learn simple R syntax, I strongly recommend avoiding

[R] How to view the source of code?

2013-08-22 Thread Marino David
Hi all R mailing listers: I am using the coda package. I tried to view the source of HPDinterval code by typing fix(HPDinterval), it dispalys as follows: function (obj, prob = 0.95, ...) UseMethod(HPDinterval) Then I search the answers about this case (see below), it still failed. Thank you in