Re: [R] changing Swaeve output settings for .pdf and .eps - is there a way?

2009-04-17 Thread cls59
markheckmann wrote: The pdf() settings do not affect Sweave settings when producing a .pdf graphic. How can I change the Sweave default settings to e.g. 3 inch? Try setting the width and height options in the figure chunk: fig1,echo=F,plot=T,pdf=T,width=5,height=3 plot(1:10 @ To

[R] question about the Text Mining package tm

2009-04-17 Thread onyourmark
Hello. I am trying to work with the text mining package tm. I have a directory called textsTweet1 which contains three files short.txt myTextFile.txt myTextFile.csv short.txt contains one line: THE CAT IN THE HAT\n myTextFile contains some tweets from Twitter. The first few lines of

[R] vertex ordering by date on a network diagram

2009-04-17 Thread fr510
Dear R helpers I am working with a csv file containing data about a citation graph. This csv file contains a column with an id of the paper containing the citation the next with the id of the paper being cited and the third the date of publication (dd/mm/). I can create a directed network

Re: [R] changing Swaeve output settings for .pdf and .eps - is there a way?

2009-04-17 Thread cameron.bracken
markheckmann wrote: The pdf() settings do not affect Sweave settings when producing a .pdf graphic. How can I change the Sweave default settings to e.g. 3 inch? Also, even if you set the width of your plot to 3 inches, the plot will be expanded to 80% of the textwidth by default. To

[R] [R-pkgs] Major bigmemory revision released.

2009-04-17 Thread Jay Emerson
The re-engineered bigmemory package is now available (Version 3.5 and above) on CRAN. We strongly recommend you cease using the older versions at this point. bigmemory now offers completely platform-independent support for the big.matrix class in shared memory and, optionally, as filebacked

Re: [R] Odp: splitting vector into equal sets

2009-04-17 Thread Petr PIKAL
utkarshsinghal utkarsh.sing...@global-analytics.com napsal dne 16.04.2009 17:20:10: Hi Pikal, Thanks for your comments and apologies for not providing a clear example. But you have completely ignored the small example I mentioned: Well, this is not exactly an example. So let us clarify

[R] Sourcecode documentation

2009-04-17 Thread _
Hi all, I am searching for a tool or a package that can generate a documentation file e.g. html, txt from defined commands like params, function etc - a tool like javadoc but featuring R. NaturalDocs support R but is a little bit to heavy for my needs. Thank you.

[R] rnorm() converted to daily

2009-04-17 Thread Ken-JP
yearly 8% drift, 25% sd why are x and y so different (x and z look ok)? Does this have something to do with biases due to the relationship between population and sample-estimates as a function of n samples and sd? Or am I doing something wrong?

[R] Turning off warnings from cor.test

2009-04-17 Thread Daren Tan
I would like to turn off the warnings from cor.test while retaining exact=NULL. Is that possible ? cor.test(c(1,2,3,3,4,5), c(1,2,3,3,4,5), method = spearman) Spearman's rank correlation rho data: c(1, 2, 3, 3, 4, 5) and c(1, 2, 3, 3, 4, 5) S = 0, p-value 2.2e-16 alternative

Re: [R] Turning off warnings from cor.test

2009-04-17 Thread Dimitris Rizopoulos
check option 'warn' in the on-line help file of ?options(), e.g., you can use something like this: op - options(warn = (-1)) # suppress warnings cor.test(c(1,2,3,3,4,5), c(1,2,3,3,4,5), method = spearman) options(op) # reset the default value, if you want I hope it helps. Best, Dimitris

[R] Linear model with interaction

2009-04-17 Thread Marian Thieme
Hi all, I have a question about linear model with interaction: I created a data frame df like this: df V1 V2 V3 V4 V5 1 6.414094 c t a g 2 6.117286 t a g t 3 5.756922 a g t g 4 6.090402 g t g t ... which holds the response in the first column and letters (a,c,g,t) in

Re: [R] there are fontencoding problem in Sweave

2009-04-17 Thread Угодай n/a
2009/4/17 Peter Dalgaard p.dalga...@biostat.ku.dk Doesn't \usepackage[noae]{Sweave} do the trick? Sweave.sty has this conditionalized. Yes, it is working. Thanks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Sourcecode documentation

2009-04-17 Thread Romain Francois
_ wrote: Hi all, I am searching for a tool or a package that can generate a documentation file e.g. html, txt from defined commands like params, function etc - a tool like javadoc but featuring R. NaturalDocs support R but is a little bit to heavy for my needs. Thank you. Google for

Re: [R] Kruskal's MDS results

2009-04-17 Thread Dieter Vanderelst
A few people suggested taking a look at Ripley's book MASS. I know the formula listed there. The point is that the manual for the isoMDS function says it's stress output is in percent. Does this mean, the stress reported by isoMDS is just the stress value in MASS (which ranges from 0 to 1)

Re: [R] rnorm() converted to daily

2009-04-17 Thread Karl Ove Hufthammer
Ken-JP: Does this have something to do with biases due to the relationship between population and sample-estimates as a function of n samples and sd? Or am I doing something wrong? --- set.seed( 1 ); x - mean( rnorm(

Re: [R] Turning off warnings from cor.test

2009-04-17 Thread Martin Maechler
DR == Dimitris Rizopoulos d.rizopou...@erasmusmc.nl on Fri, 17 Apr 2009 09:44:49 +0200 writes: DR check option 'warn' in the on-line help file of ?options(), e.g., you DR can use something like this: DR op - options(warn = (-1)) # suppress warnings DR

[R] [R-pkgs] FD: R package to measure functional diversity indices

2009-04-17 Thread Etienne Laliberté
Dear useRs, The FD package is intended for ecologists interested in functional diversity (FD). It measures different functional diversity indices from multiple traits (any type of traits). The first version of FD (1.0-0) is now available on CRAN: http://cran.r-project.org/web/packages/FD/ The

Re: [R] rnorm() converted to daily

2009-04-17 Thread Ken-JP
Hi Karl, Your comment is very interesting. Do you mean I should favor: rnorm(n, 0, 1) * b + a over rnorm(n, a, b) ? What is the proper/safe way to use rnorm()? FWIW, set.seed( 1 ); yy - mean( rnorm( 10 ) *

Re: [R] rnorm() converted to daily

2009-04-17 Thread Meyners, Michael, LAUSANNE, AppliedMathematics
SD in y is more than 15 times (!!!) larger than in x and z, respectively, and hence SD of the mean y is also larger. 100,000 values are not enough to stabilize this. You could have obtained 0.09 or even larger as well. Try y with different seeds, y varies much more than x and z do. Or check the

[R] Manipulate single line in textfile

2009-04-17 Thread Guillaume Filteau
Hello all, Is it possible to modify a single line in a textfile? I know it is possible to load the whole text file, do the change, and save this as a new file. However, this is not practical in my case, because the document is huge and cannot be fully loaded in R. Any idea? Best, Guillaume

Re: [R] rnorm() converted to daily

2009-04-17 Thread Karl Ove Hufthammer
Ken-JP: Do you mean I should favor: rnorm(n, 0, 1) * b + a over rnorm(n, a, b) No, as I said, they give exactly the same results. -- Karl Ove Hufthammer __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Manipulate single line in textfile

2009-04-17 Thread Barry Rowlingson
On Fri, Apr 17, 2009 at 9:20 AM, Guillaume Filteau filt...@unc.edu wrote: Hello all, Is it possible to modify a single line in a textfile? I know it is possible to load the whole text file, do the change, and  save this as a new file. However, this is not practical in my case, because the

[R] matching subvectors in vector sets

2009-04-17 Thread Albert Vilella
Hi, I've got a list of ~2 elements that look like this: [1] A00096:A00096:A00096:A00096:A02178:A02178:A07776 [2] A00046:A00076:A01101:A04146:A05671:A07169 [3] A00038:A00932:A02185:A02370:A02818:A02818:A02818:A02818:A04732:A07142:A07142 [4] A00096:A01352:A01352:A02023:A05001:A05001:A07776

Re: [R] get() versus getAnywhere()

2009-04-17 Thread Duncan Murdoch
Benjamin Tyner wrote: Many thanks Duncan. Perhaps this merits a more explicit note in the documentation? The quote I gave is from the documentation. How could it be more explicit? Duncan Murdoch Duncan Murdoch wrote: On 4/16/2009 9:52 AM, Benjamin Tyner wrote: Hi Using R

Re: [R] changing Swaeve output settings for .pdf and .eps - is there a way?

2009-04-17 Thread Duncan Murdoch
cameron.bracken wrote: markheckmann wrote: The pdf() settings do not affect Sweave settings when producing a .pdf graphic. How can I change the Sweave default settings to e.g. 3 inch? Also, even if you set the width of your plot to 3 inches, the plot will be expanded to 80% of the

Re: [R] map of china without regions

2009-04-17 Thread Roger Bivand
Ray Brownrigg Ray.Brownrigg at ecs.vuw.ac.nz writes: Sorry, can't be done at the moment with the maps package. ... You *might* be able to achieve what you want by selecting only those line segments that provide portions of the external border, but I would suggest that other packages

Re: [R] Kruskal's MDS results

2009-04-17 Thread Jari Oksanen
Dieter Vanderelst Dieter.Vanderelst at ua.ac.be writes: A few people suggested taking a look at Ripley's book MASS. I know the formula listed there. The point is that the manual for the isoMDS function says it's stress output is in percent. Does this mean, the stress reported by isoMDS is

[R] multiplot numbering

2009-04-17 Thread rajesh j
Hi, I have a multiplot in which i need to label each plot as (a) (b) etc. preferably on the right side of each plot. My layout is one plot below the other.How can i do this? -- Rajesh.J [[alternative HTML version deleted]] __

[R] Numeric data calculated in bwplot

2009-04-17 Thread Yuri Volchik
Hi, i was wondering if there is a way to extract statistic calculated by the function bwplot in numeric format, i.e. a list with values of borders mean etc. Going through the help i couldn't find it, and text of the function itself(bwplot) is very long. Thanks -- View this message in context:

Re: [R] How to control distance between rows of figures in multiple plots

2009-04-17 Thread jim holtman
?par look at the 'mar' parameter. On Thu, Apr 16, 2009 at 11:54 PM, Gundala Viswanath gunda...@gmail.com wrote: Dear all, I have a plot with 2 x 2 figures matrix in it. pdf(~/Desktop/myplot.pdf,width=13,height=7) par(mfrow=c(2,2)) # follow by some code Now the distance between figures

Re: [R] multiplot plot spacing and text strip

2009-04-17 Thread jim holtman
?par(mar=...) ?mtext On Thu, Apr 16, 2009 at 11:31 PM, rajesh j akshay.raj...@gmail.com wrote: Hi everyone, I have a certain requirement and I'm not sure what to do.I need to reduce the spacing between plots in a multiplot. Make them really close together such that they almost touch. Also,

Re: [R] Kruskal's MDS results

2009-04-17 Thread Jari Oksanen
Dieter Vanderelst Dieter.Vanderelst at ua.ac.be writes: The point is that the manual for the isoMDS function says it's stress output is in percent. Does this mean, the stress reported by isoMDS is just the stress value in MASS (which ranges from 0 to 1) value multiplied by 100? I've haven't

Re: [R] Manipulate single line in textfile

2009-04-17 Thread jim holtman
You can also read/write portions of the text till you get to the line you want to change, change it and then continue copying the lines. This is what would be done with any other software approach in trying to replace 'text' that may not be the same length. On Fri, Apr 17, 2009 at 4:20 AM,

Re: [R] Presenting R Results in Webpages

2009-04-17 Thread Jim Lemon
Jason Rupert wrote: I apologize in advance that this question is not specific to R, but I thought some R users may be using this in their work process flow. I would like to be able to have a tool (prefer scriptable) that will take two images and some pre-written text and put it on an simple

Re: [R] error bars in matplot

2009-04-17 Thread Jim Lemon
Tim Smith wrote: Hi, I was trying to get error bars in my matplot. I looked at an earlier thread, and the sample code that I made is: #-- library(plotrix) mat1 - matrix(sample(1:30,10),nrow=5,ncol=2) ses - matrix(sample(1:3,10,replace=T),nrow=5,ncol=2) vect - seq(20,100,20)

[R] R 2.9.0 is released

2009-04-17 Thread Peter Dalgaard
I've rolled up R-2.9.0.tar.gz a short while ago. This is a development release which contains a number of new features. Also, a number of mostly minor bugs have been fixed. See the full list of changes below. You can get it (later today) from

[R] Using spdep example data and R code : bbox should never contain infinite values

2009-04-17 Thread Dejan Gregor
Hi, I am facing with a problem when running a code against the sample data from spdep. I am getting SpatialPoints object : bbox should never contain infinite values In additionl Warning Messages: 1. In min(x): no non-missing arguments to min; returning Inf 2. In max(x): no non-missing arg...

Re: [R] Numeric data calculated in bwplot

2009-04-17 Thread stephen sefick
library(lattice) x - bwplot(voice.part ~ height, data=singer, xlab=Height (inches)) str(x) I have not done this before, but the output of str should give you a starting point for extracting numeric values contained in one of the numerous lists. hope this helps Stephen Sefick On Fri, Apr 17,

[R] How to create the null distribution

2009-04-17 Thread Anders Bjorn
Hi, I want to bootstrap the likelihood ratio test for testing linear restrictions on the parameters of a regression model. The aim is to perform a size and power analysis. My question is, as indicated by the subject, how do I approximate the null distribution? The code that I ran looks like

Re: [R] Kruskal's MDS results

2009-04-17 Thread Dieter Vanderelst
Thank you for clearing this out. Jari Oksanen wrote: Dieter Vanderelst Dieter.Vanderelst at ua.ac.be writes: The point is that the manual for the isoMDS function says it's stress output is in percent. Does this mean, the stress reported by isoMDS is just the stress value in MASS (which

Re: [R] matching subvectors in vector sets

2009-04-17 Thread Albert Vilella
Starting by the first entry: A00096:A00096:A00096:A00096:A02178:A02178:A07776 and supposing there aren't any other subvectors identical in the set, the algorithm will slide through the vector, first in pairs, then in trios, then in sets of four, etc, and count the occurrences: A00096:A00096 3

[R] cast function in package reshape

2009-04-17 Thread David Hajage
Hello R useRs, I have a function which returns a list of functions : freq1 - function(x) { lev - unique(x[!is.na(x)]) nlev - length(lev) args - alist(x=) if (nlev == 1) { body - c({, sum(!is.na(x)), }) f - function() {} formals(f) - as.pairlist(args) body(f) - parse(text

Re: [R] Presenting R Results in Webpages

2009-04-17 Thread David Hajage
You could perhaps use asciidoc http://www.methods.co.nz/asciidoc/and ascii http://eusebe.github.com/ascii/package (but I'm not sure you could obtain exactly the layout you describe...). 2009/4/17 Jim Lemon j...@bitwrit.com.au Jason Rupert wrote: I apologize in advance that this question is

[R] S+FinMetrics

2009-04-17 Thread Hassan Mohamed
please !, what is the R equivalents for the S-plus package : S+FinMetrics thanks hassan [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Presenting R Results in Webpages

2009-04-17 Thread David Hajage
and also R2HTML. 2009/4/17 David Hajage dhajag...@gmail.com You could perhaps use asciidoc http://www.methods.co.nz/asciidoc/and ascii http://eusebe.github.com/ascii/package (but I'm not sure you could obtain exactly the layout you describe...). 2009/4/17 Jim Lemon j...@bitwrit.com.au

Re: [R] S+FinMetrics

2009-04-17 Thread Patrick Burns
Resources include: * Rmetrics * The finance task view on CRAN * The R-sig-finance mailing list Patrick Burns patr...@burns-stat.com +44 (0)20 8525 0696 http://www.burns-stat.com (home of The R Inferno and A Guide for the Unwilling S User) Hassan Mohamed wrote: please !, what is the R

Re: [R] cast function in package reshape

2009-04-17 Thread hadley wickham
On Fri, Apr 17, 2009 at 8:38 AM, David Hajage dhajag...@gmail.com wrote: Hello R useRs, I have a function which returns a list of functions : freq1 - function(x) {  lev - unique(x[!is.na(x)])  nlev - length(lev)  args - alist(x=)  if (nlev == 1) {    body - c({, sum(!is.na(x)), })    f

Re: [R] Lattice xyplot with text under x-axis

2009-04-17 Thread kate.m
A million thanks Deepayan! That works great. Deepayan Sarkar wrote: On Wed, Apr 15, 2009 at 8:59 AM, kate.m katherine...@gmail.com wrote: Hi All, I have a data set which I need to plot and show the values of one of the variables as a second x-axis. library(lattice)

[R] Coloring X, Y and Main Label

2009-04-17 Thread Gundala Viswanath
Dear all, I have no problem coloring the axis and plot, following these procedures: http://www.nabble.com/Coloring-X-and-Y-axis-tt22989739r0.html#a22989739 However the X,Y and Main Label stays in black. How can we change their colors? - Gundala Viswanath Jakarta - Indonesia

[R] Modular Arithmetic Error?

2009-04-17 Thread iuhz7j202
Hi, I'm using the '%%' operator in some code, and am running into the following erroneous outcome: 1.2 %% 0.2 [1] 0.2 Unless I'm very mistaken, the result should be 0 (indeed, 12 %% 2 does result in 0). Furthermore: 1.20001 %% 0.2 [1] 0.2 (1.2+1e17) %% .2 [1] 0

Re: [R] Modular Arithmetic Error?

2009-04-17 Thread iuhz7j202
A few further oddities (no longer having to do with modular arithmetic): (0.3 * 3) == 0.9 [1] FALSE (0.2 * 6) == 1.2 [1] FALSE This is bad behavior, right? I feel like I'm going crazy. I'm using R version 2.8.1 (2008-12-22). Thanks, Peter __

Re: [R] Modular Arithmetic Error?

2009-04-17 Thread ONKELINX, Thierry
That is more or less FAQ 7.31: http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-the se-numbers-are-equal_003f ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for

Re: [R] Modular Arithmetic Error?

2009-04-17 Thread Doran, Harold
You should read the FAQ 7.31 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of iuhz7j...@sneakemail.com Sent: Friday, April 17, 2009 10:30 AM To: r-help@r-project.org Subject: Re: [R] Modular Arithmetic Error? A few

Re: [R] Coloring X, Y and Main Label

2009-04-17 Thread Jorge Ivan Velez
Dear Gundala, See col.lab and col.main arguments in ?par. plot(1,col.lab='red',col.main='blue',main='Title here') HTH, Jorge On Fri, Apr 17, 2009 at 10:14 AM, Gundala Viswanath gunda...@gmail.comwrote: Dear all, I have no problem coloring the axis and plot, following these procedures:

Re: [R] Modular Arithmetic Error?

2009-04-17 Thread Dimitris Rizopoulos
check the R FAQ, and in particular entry 7.31: http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f Best, Dimitris iuhz7j...@sneakemail.com wrote: A few further oddities (no longer having to do with modular arithmetic): (0.3 * 3) == 0.9 [1]

Re: [R] Modular Arithmetic Error?

2009-04-17 Thread iuhz7j202
That explains it, thanks. all.equal() gets it right. I always knew I had to be careful with rounding errors, just not with something like (0.2*6)... I guess I'll just have to avoid using '%%' or '%/%' with non-integers, at least if I need it to sometimes come out even. Thanks again, Peter That

[R] Color of points in a 3d plot of a PCA

2009-04-17 Thread Alejandro González
Dear all, I'm trying to perform a principal components analysis of a sample of individuals, and to plot it in 3D, assigning different colors according to the population each individual belongs to. Given that the matrix I have to use for the PCA cannot contain cualitative variables (here, the

Re: [R] Modular Arithmetic Error?

2009-04-17 Thread Marc Schwartz
On Apr 17, 2009, at 9:29 AM, iuhz7j...@sneakemail.com wrote: A few further oddities (no longer having to do with modular arithmetic): (0.3 * 3) == 0.9 [1] FALSE (0.2 * 6) == 1.2 [1] FALSE This is bad behavior, right? No... (0.3 * 3) - 0.9 [1] -1.110223e-16 (0.2 * 6) - 1.2 [1]

Re: [R] Color of points in a 3d plot of a PCA

2009-04-17 Thread Duncan Murdoch
On 4/17/2009 10:43 AM, Alejandro González wrote: Dear all, I'm trying to perform a principal components analysis of a sample of individuals, and to plot it in 3D, assigning different colors according to the population each individual belongs to. Given that the matrix I have to use for the PCA

[R] Create histogram from data matrix

2009-04-17 Thread Paul Warren Simonin
Hello! Thanks for reading this request for assistance. I have a question regarding creating a histogram-like figure from data that are not currently in the correct format for the hist command. Specifically, my data have been processed and are in a matrix with columns containing the

Re: [R] Using trace

2009-04-17 Thread Stavros Macrakis
Well, yes, of course I could add the code to the function by hand. I could also calculate square roots by hand. But -- as in every other basic programming environment -- there exists an R function 'trace' which appears to automate the process, and I can't figure out how to use it to handle this

[R] Generate bivariate binomial data

2009-04-17 Thread ONKELINX, Thierry
Dear all, Could someone point me to a function or algorithm to generate random bivariate binomial data? Some details about what I'm trying to do. I have a dataset of trees who were categorised as not damaged or damaged. Each tree is measured twice (once in two consecutive years). The trees can

Re: [R] error bars in matplot

2009-04-17 Thread Tim Smith
Thanks Mathieu and Jim, That worked! From: Jim Lemon j...@bitwrit.com.au Cc: r r-h...@stat.math.ethz.ch Sent: Friday, April 17, 2009 7:45:39 AM Subject: Re: [R] error bars in matplot Tim Smith wrote: Hi, I was trying to get error bars in my matplot. I

Re: [R] Using trace

2009-04-17 Thread ronggui
Here is a partial solution: trace(fact,quote({cat(sprintf(x= %i\n,x));return}),print=T) [1] fact fact(4) Tracing fact(4) on entry x= 4 Tracing fact(x - 1) on entry x= 3 Tracing fact(x - 1) on entry x= 2 Tracing fact(x - 1) on entry x= 1 Tracing fact(x - 1) on entry x= 0 [1] 24 2009/4/17

[R] args and test of passed paramters

2009-04-17 Thread Juergen Rose
Hi, I would like to call a R script sometimes with: R --slave --vanilla --args Debug=1 N=25 test.R and sometimes with R --slave --vanilla Debug=1 test.R or similar. Inside the R script I get the arguments with: args=(commandArgs(TRUE)) if(length(args)==0){ print(===No arguments

Re: [R] Generate bivariate binomial data

2009-04-17 Thread Christian Ritz
Hi Thierry, I think it should be possible to generate such correlated data using a mixed model approach: 1) Generate pairs of correlated linear predictor values using an ordinary linear mixed model setup (for example using rnorm() repeatedly) 2) Back-transform these values using the inverse

Re: [R] issue with L-BFGS-B in optim (optim just hangs)

2009-04-17 Thread Tiago Marques
Dear R-help list, Just a wrap up for this issue. Thanks to Ravi Varadan and Paul Smith for useful feedback (both on and off list). It seems like the culprit was another function being called within optim, namely adapt (used to solve numerically a double integral in the likelihood I am

[R] R on Windows and RMySQL

2009-04-17 Thread silv
I have successfully installed R (version 2.8.1) and RMySQL (version 0.7-4) on my PC (Windows). Now I have a problem running RMySQL on R. I constantly receive the following error-message: Error in utils::readRegistry(SOFTWARE\\MySQL AB, hive = HLM, maxdepth = 2) : Registry-Schlüssel 'S'

[R] numbers loop in R

2009-04-17 Thread emj83
I would like to create a matrix in R that looks similar to this: [,1] [,2] [,3] [,4] [1,] NaN 1 2 3 [2,] NaN 1 2 4 [3,] NaN 1 2 5 [4,] NaN 2 3 4 [5,] NaN 2 3 5 [6,] NaN345 I have the loop below: where A for example is 5 matrixx-function(A){

Re: [R] Numeric data calculated in bwplot

2009-04-17 Thread Deepayan Sarkar
On 4/17/09, Yuri Volchik yuri.volc...@gmail.com wrote: Hi, i was wondering if there is a way to extract statistic calculated by the function bwplot in numeric format, i.e. a list with values of borders mean etc. See ?boxplot.stats -Deepayan

Re: [R] R on Windows and RMySQL

2009-04-17 Thread Duncan Murdoch
On 4/17/2009 6:48 AM, s...@access.unizh.ch wrote: I have successfully installed R (version 2.8.1) and RMySQL (version 0.7-4) on my PC (Windows). Now I have a problem running RMySQL on R. I constantly receive the following error-message: Error in utils::readRegistry(SOFTWARE\\MySQL AB, hive

Re: [R] issue with L-BFGS-B in optim (optim just hangs)

2009-04-17 Thread Ravi Varadhan
Tiago, If you have an improper integral, i.e. with at least one of the limits being infinite, it is generally not a good idea to use large positive or negative values to compute such integrals. You should use integrate (calling it twice) to compute your double integral. This might solve your

Re: [R] matching subvectors in vector sets

2009-04-17 Thread jim holtman
How about this: x - A00096:A00096:A00096:A00096:A02178:A02178:A07776 x.s - unlist(strsplit(x, :)) for (i in 2:length(x.s)){ + x.seq - embed(length(x.s):1, i) + print(table(apply(x.seq, 1, function(z){ + paste(x.s[z], collapse=:) + }))) + } A00096:A00096 A00096:A02178

Re: [R] Using trace

2009-04-17 Thread Stavros Macrakis
Yes, that is similar to the solution in my original posting, but doesn't solve the problem I was having with that solution, namely reporting on the return value. -s On Fri, Apr 17, 2009 at 11:28 AM, ronggui ronggui.hu...@gmail.com wrote: Here is a partial solution:

Re: [R] Create histogram from data matrix

2009-04-17 Thread stephen sefick
It would be easier if you were to make a data frame of fake values to illustrate your point, so that we could just copy it into an R session and see if we can't get it to work. So, a stab in the dark would to look at ggplot2 specifically the hist argument in qplot and the facets, the lattice

Re: [R] numbers loop in R

2009-04-17 Thread David Winsemius
I would have expected to see the assignment to B[k,] inside the loops. And to see some connection with the k index in the inner loops if you did not want all of the rows to be similar. Because the assignment is outside the loops, it happens only once. -- David Winsemius On Apr 17, 2009,

Re: [R] numbers loop in R

2009-04-17 Thread jim holtman
try this: matrixx-function(A){ + B=matrix(NaN,nrow=(A+1),ncol=4) + k - 1 + for (i in 3:A){ + for (j in i:A) { + B[k,] - c(NaN, i-2, i-1, j) + k - k + 1 + } + } + B + } matrixx(5) [,1] [,2] [,3] [,4] [1,] NaN123 [2,]

Re: [R] Create histogram from data matrix

2009-04-17 Thread hadley wickham
On Fri, Apr 17, 2009 at 9:59 AM, Paul Warren Simonin paul.simo...@uvm.edu wrote: Hello!  Thanks for reading this request for assistance. I have a question regarding creating a histogram-like figure from data that are not currently in the correct format for the hist command.  Specifically, my

Re: [R] R on Windows and RMySQL

2009-04-17 Thread Duncan Murdoch
On 4/17/2009 12:26 PM, Duncan Murdoch wrote: On 4/17/2009 12:26 PM, Duncan Murdoch wrote: On 4/17/2009 6:48 AM, s...@access.unizh.ch wrote: I have successfully installed R (version 2.8.1) and RMySQL (version 0.7-4) on my PC (Windows). Now I have a problem running RMySQL on R. I constantly

Re: [R] numbers loop in R

2009-04-17 Thread hadley wickham
On Fri, Apr 17, 2009 at 12:19 PM, jim holtman jholt...@gmail.com wrote: try this: matrixx-function(A){ +     B=matrix(NaN,nrow=(A+1),ncol=4) +     k - 1 +     for (i in 3:A){ +         for (j in i:A) { +             B[k,] - c(NaN, i-2, i-1, j) +             k - k + 1 +         } +     }

[R] Margins in lattice and device resolution

2009-04-17 Thread Gustaf Rydevik
Hi all, I believe I've run into this before, but I seem to have totally forgotten. No headway in the last couple of hours either. How do I make sure that points and margins remain the same absolute size as I change the resolution of a device? (I'm running 2.9.1 patched, on a Win XP-machine) Many

Re: [R] Create histogram from data matrix

2009-04-17 Thread jim holtman
here is one way: mydata - data.frame(observ=sample(1:10,20,TRUE), value=sample(1:6,20,TRUE)) mydata observ value 1 3 6 2 4 2 3 6 4 4 10 1 5 3 2 6 9 3 7 10 1 8 7 3 9 7 6 10 1 3 11 3 3 12

Re: [R] Lattice xyplot with text under x-axis

2009-04-17 Thread kate.m
Still on this question, I'm having problems with displaying the text when repeated values are present. For example: library(lattice) year-c(2001,2002,2003,2001,2002,2003,2001,2002,2003,2001,2002,2003) fac-c(arts,arts,arts,arts,arts,arts,sci,sci,sci,sci,sci,sci)

Re: [R] From daily series to monthly and viceversa

2009-04-17 Thread manta
any update anybody? I'm really stucked! -- View this message in context: http://www.nabble.com/From-daily-series-to-monthly-and-viceversa-tp23064454p23103052.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

[R] Monotone Transformation

2009-04-17 Thread Feng Jingyu
Hi, I am trying to use R to mimic what I did in SAS. proc transreg data=x ; model identity(GSI)=monotone(group1); output out=d2 pprefix=M; run; Accroding to SAS documentation, the MONOTONE transfomation algorithm comes from (Kruskal 1964, secondary approach to ties). I

Re: [R] Create histogram from data matrix

2009-04-17 Thread Paul Warren Simonin
Thank you all for your advice. I have received some good tips, but it was suggested I write back with a small simulated data set to better illustrate my needs. So, currently my data frame looks something like: ID (date) Temperature Number of fish 200706183 5 456 200706183

Re: [R] changing Swaeve output settings for .pdf and .eps - is there a way?

2009-04-17 Thread cameron.bracken
Duncan Murdoch-2 wrote: There are other ways to control the size: it isn't always 80%. I normally use something like \setkeys{Gin}{width=0.75\textwidth} to control it. You can reset this a number of times in the same document. (Read the LaTeX docs for graphicx to see the other

[R] Separating variables in read.table

2009-04-17 Thread Richardson, Patrick
If I have a table (we'll call it, test) containing two columns (as below): i x1 x2 x3 x4 x5 y 0 1.125 0.232 7.160 0.0859 8.905 1.5563 7 0.920 0.268 8.804 0.0865 7.388 0.8976 15 0.835 0.271 8.108 0.0852 5.348 0.7482 22 1.000

[R] Matrix package,solve() errors and crashes

2009-04-17 Thread Surendar Swaminathan
Hello All, I am working on graph object using IGRAPH package wanted to do Bonacich Power. This is my graph object. The file 'Graph.RData' (4.2 MB) is available for download at http://dropbox.unl.edu/uploads/20090424/cfe4fcb854bb17f2/Graph.RData Graph size Vertices: 20984 Edges: 326033

Re: [R] Generate bivariate binomial data

2009-04-17 Thread Charles C. Berry
On Fri, 17 Apr 2009, ONKELINX, Thierry wrote: Dear all, Could someone point me to a function or algorithm to generate random bivariate binomial data? Some details about what I'm trying to do. I have a dataset of trees who were categorised as not damaged or damaged. Each tree is measured twice

[R] Separating variables in read.table

2009-04-17 Thread Richardson, Patrick
If I have a table (we'll call it, test) containing seven columns (as below): i x1 x2 x3 x4 x5 y 0 1.125 0.232 7.160 0.0859 8.905 1.5563 7 0.920 0.268 8.804 0.0865 7.388 0.8976 15 0.835 0.271 8.108 0.0852 5.348 0.7482 22 1.000

Re: [R] Separating variables in read.table

2009-04-17 Thread Jorge Ivan Velez
Dear Patrick, Perhaps attach might be what you are looking for. attach(test) i x1 x2 . . . y HTH, Jorge On Fri, Apr 17, 2009 at 3:23 PM, Richardson, Patrick patrick.richard...@vai.org wrote: If I have a table (we'll call it, test) containing two columns (as below): i x1 x2

[R] ColorRamp different from ColorRampPalette

2009-04-17 Thread Etienne B. Racine
I try to use ColorRamp as ColorRampPalette (i.e. with the same gradient), but it seems there is a nuance that I've missed. pal.crp-colorRampPalette( c(blue, white, red), space = rgb) plot(rep(0,40),pch=16,col=pal.crp(40)) # is great But, using the same gradient with colorRamp is giving erratic

Re: [R] Separating variables in read.table

2009-04-17 Thread Etienne Bellemare Racine
see ?attach Etienne Richardson, Patrick a écrit : If I have a table (we'll call it, test) containing two columns (as below): i x1 x2 x3 x4 x5 y 0 1.125 0.232 7.160 0.0859 8.905 1.5563 7 0.920 0.268 8.804 0.0865 7.388 0.8976 150.835

[R] real numeric variable transforms into factor:

2009-04-17 Thread Aldi Kraja
Hi Test made in: R in windows Vista OS, R version 2.8.1 From FAQ: http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-do-I-convert-factors-to-numeric_003f It may happen that when reading numeric data into R (usually, when reading in a file), they come in as factors. If |f| is such a factor

Re: [R] ColorRamp different from ColorRampPalette

2009-04-17 Thread hadley wickham
Look at the output of pal.cr((0:40)/40) Hadley On Fri, Apr 17, 2009 at 2:42 PM, Etienne B. Racine etienn...@gmail.com wrote: I try to use ColorRamp as ColorRampPalette (i.e. with the same gradient), but it seems there is a nuance that I've missed. pal.crp-colorRampPalette( c(blue, white,

Re: [R] ColorRamp different from ColorRampPalette

2009-04-17 Thread Etienne B. Racine
Thanks Hadley, Is it the solution you would recommend ? rgb(pal.cr((0:40)/40), maxColorValue=255) Etienne hadley wrote: Look at the output of pal.cr((0:40)/40) Hadley On Fri, Apr 17, 2009 at 2:42 PM, Etienne B. Racine etienn...@gmail.com wrote: I try to use ColorRamp as

Re: [R] Separating variables in read.table

2009-04-17 Thread Phil Spector
Patrick - There's no simple way to do what you want, because R discourages you from having lots of separate related objects. Instead, you are encouraged to store your objects in an organized form, such as a list, data frame or matrix. For your example, I'm assuming you are using the word

Re: [R] real numeric variable transforms into factor:

2009-04-17 Thread Marc Schwartz
On Apr 17, 2009, at 2:52 PM, Aldi Kraja wrote: Hi Test made in: R in windows Vista OS, R version 2.8.1 From FAQ: http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-do-I-convert-factors-to-numeric_003f It may happen that when reading numeric data into R (usually, when reading in a file), they come

Re: [R] Separating variables in read.table

2009-04-17 Thread Johannes Huesing
Richardson, Patrick patrick.richard...@vai.org [Fri, Apr 17, 2009 at 09:31:35PM CEST]: If I have a table (we'll call it, test) containing seven columns (as below): i x1 x2 x3 x4 x5 y 0 1.125 0.232 7.160 0.0859 8.905 1.5563 7 0.920 0.268 8.804

  1   2   >