Re: [R] question re. package playwith not able to run command getting error message that I'm attempting to use non function

2012-01-20 Thread R. Michael Weylandt
Hcan you give session info (after loading playwith)? I'm able to get that code to work...also -- can you get the basic RGtk functions (like gwindow() ) to work? Michael On Thu, Jan 19, 2012 at 5:28 PM, Farhat Maha mar...@gmail.com wrote: Hello, I managed to install playwith package and

Re: [R] error

2012-01-20 Thread ONKELINX, Thierry
This is discussed in the help of seq(). See the details section of ?sec Best regards, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie Kwaliteitszorg / team Biometrics Quality Assurance Kliniekstraat 25 1070

Re: [R] fitting an exp model

2012-01-20 Thread arivald
Thank You! -- View this message in context: http://r.789695.n4.nabble.com/fitting-an-exp-model-tp4310752p4312661.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] rsp

2012-01-20 Thread Ashy
Could anyone please tell how to pass parameters of form to server in rsp? -- View this message in context: http://r.789695.n4.nabble.com/rsp-tp4312635p4312635.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

[R] Symlet package in R Cran

2012-01-20 Thread Alaios
Dear all, I would like to ask you if you know there is a symlet package that can be used to create those and apply them in a DWT . B.R Alex [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] show plot

2012-01-20 Thread Soheila Khodakarim
Dear All I have 54000 plots in R, How can I observe them? If I‌ have to save them one-by-one? Soheila [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] dataframe: how to select an element from a row

2012-01-20 Thread ikuzar
Thank you Jorge and Florent for your responses. Now, I 'd like to get the date *(and its index) *where myvalue 2000 for the first time. I expect for a result like (index, date) = (3, 2012-01-07 ) This way does not work: ind = match(df$myvalue 2000, df$myvalue) res = df$DateTime[ind] -- View

[R] Legend appearance

2012-01-20 Thread Sri krishna Devarayalu Balanagu
Hi All, I want small modification in apperance of legend. I want seperate legend for each graph representing the lines present in that graph only (not all the lines in all graphs) . Can you please help? Thank you Regards Devarayalu Orange1 - structure(list(REFID = c(7, 7, 7, 7, 7, 7, 7, 7, 8,

Re: [R] dataframe: how to select an element from a row

2012-01-20 Thread ikuzar
This works but I do not know if there is a better way tmp = df[df$myvalue2000,] ind = match(tmp$myvalue, df$myvalue) res = df$DateTime[ind] solution = list(ind[1], res[1]) -- View this message in context:

Re: [R] show plot

2012-01-20 Thread Petr PIKAL
Huh If you spend only 10 seconds inspecting one plot you will need about 150 hours for that task. I would recommend to reconsider this issue for your own sanity. Anyway you can save them either to separate files or in multi page PDF document although I do not know if there is some limit in

[R] Odp: Legend appearance

2012-01-20 Thread Petr PIKAL
Hi You shall at least read what others wrote you about your code. here is a quote from what I wrote you yesterday and what stays valid for today too. Also be aware that all levels of a factor are preserved in a subset unless you specifically strip the unused levels. Therefore there is a

Re: [R] show plot

2012-01-20 Thread Petr PIKAL
Thank you very much, but in *.pdf I can see 1 plot, may I‌ ask you another question? How can see more than one in each page? You just press page down or up for moving through pdf document. But seriously, try it yourself lll - split(rnorm(100) , rep(1:10, each=10)) pdf(test.pdf) for (i

[R] test if text is part of vector

2012-01-20 Thread Johannes Radinger
Hello, this is a very simple question: How can I find out if a word is part of a list of words like: a - word1 b - word4 vector - c(word1,word2,word3) I tried it with match(a,vector) but this gives the position of the word. I am not sure if and how that can be done with a logical operator

Re: [R] test if text is part of vector

2012-01-20 Thread Petr PIKAL
Hi Hello, this is a very simple question: How can I find out if a word is part of a list of words like: a - word1 b - word4 vector - c(word1,word2,word3) I tried it with match(a,vector) but this gives the position of the word. Perhaps a %in% vector Regards Petr I am not

Re: [R] test if text is part of vector

2012-01-20 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 20/01/12 12:50, Johannes Radinger wrote: Hello, this is a very simple question: How can I find out if a word is part of a list of words like: a - word1 b - word4 vector - c(word1,word2,word3) I tried it with match(a,vector) but this

[R] VarCov matrix - quantile regression.

2012-01-20 Thread Julia Lira
Dear all, I would like to know how to print the variance-covariance matrix used in the function anova.rq () when investigating whether the coefficients of a quantile regression model is the same for a range of quantiles. To be more precise, when I use the function summary.rq(, cov=TRUE)

Re: [R] test if text is part of vector

2012-01-20 Thread Johannes Radinger
Hi, thank you very much... %in% is the operator I was looking for. cheers, johannes Original-Nachricht Datum: Fri, 20 Jan 2012 13:01:54 +0100 Von: Rainer M Krug r.m.k...@gmail.com An: Johannes Radinger jradin...@gmx.at CC: R-help@r-project.org Betreff: Re: [R] test if

Re: [R] Split values in vector

2012-01-20 Thread Johannes Radinger
Hello all, I think I am now on the way to correctly split the vector as I want it using for loops. I got now to a point where I got stuckedSo maybe someone can help me out... Remember the result I am looking for should look like (for the input vector I want to split see below: var3) var1

Re: [R] test if text is part of vector

2012-01-20 Thread R. Michael Weylandt michael.weyla...@gmail.com
You also might look at grepl() if you have time: it allows regular expressions and will be a little (a lot?) more flexible in how you define a match if you want to ignore things like capitalization. (mnemonic: the L in grepl indicates its like grep but returns logicals instead of positions)

Re: [R] show plot

2012-01-20 Thread R. Michael Weylandt michael.weyla...@gmail.com
Use layout() to put multiple plots on a single page. (Note that with 50k plots you'll want layout() and multiple pages.) Michael On Jan 20, 2012, at 6:46 AM, Petr PIKAL petr.pi...@precheza.cz wrote: Thank you very much, but in *.pdf I can see 1 plot, may I‌ ask you another question?

[R] Contour plot on a triangular mesh

2012-01-20 Thread Roary
Hi All, I have 3 variables which present a perfect linear dependency such that the third is the sum of the first two. I have an ordinary 2D contour plot on a square grid with the first two variables forming the axes and the third naturally being the diagonals. From an interpretive point of view

Re: [R] Serial Date

2012-01-20 Thread uday
Hi, How I should convert Fractional days in Year Month Days Hour Minute and Day format ? -- View this message in context: http://r.789695.n4.nabble.com/Serial-Date-tp3353123p4313144.html Sent from the R help mailing list archive at Nabble.com. __

[R] Point biserial correlation = Is there any specific command or could I just use cor.test?

2012-01-20 Thread Cadu
Hello, I found in the forum two threads about point biserial correlation. One of them (1) mentioned a point-biserial correlation is just a Pearson correlation where one of the variables is dichotomous. Thus, the command is just the normal cor function. The other (2) mentioned Professor Fox's

Re: [R] Split values in vector

2012-01-20 Thread Johannes Radinger
Hello again, No I managed to do everything correctly... the code now looks like: var1 -seq(1,5) var2 -c(A,B,C,D,E) var3 -c(00,01-1;02-3;04-1,01-2;02-1,01-0;04-2,NA) x - data.frame(var1,var2,var3) #create new columns and prefill with 0 x$var3_01 - 0 x$var3_02 - 0 x$var3_03 - 0 x$var3_04 - 0 a

Re: [R] show plot

2012-01-20 Thread Petr PIKAL
Hi Yes with layout she can put several plots on one page, but if I consider 20 plots per page and one minute per page inspection, 54000 plots is still more than 2000 pages and about 40 hours, which I do not consider as a well spent time. Regards Petr Use layout() to put multiple plots on

Re: [R] Serial Date

2012-01-20 Thread R. Michael Weylandt
If you are going to resurrect old threads, it's kind to at least read them. Use the chron package as suggested by Gabor. Michael On Fri, Jan 20, 2012 at 7:54 AM, uday uday_143...@hotmail.com wrote: Hi, How I should convert Fractional days in Year Month Days Hour Minute and Day format ?

Re: [R] Bayesian data analysis recommendations

2012-01-20 Thread Matt Shotwell
On Thu, 2012-01-19 at 19:23 -0500, C W wrote: Thanks, Rich, I will look at the book. I agree, there are many nice packages, but what if the package changes in a few years? I would have no idea what is going on! I've heard from predecessor in the industry who emphasize the learning, not

[R] Calling Windows DLL using .C; function name not known but in exports.

2012-01-20 Thread Alex van der Spek
First time ever that I try to call subroutines in a Win DLL using R. Have done this before using VBA and Python. The C code's function argument list contains only double pointers (double *x). The function is declared void, the output value is one of the arguments. C calling sequence is used.

[R] a question about taylor.diagram in plotrix package

2012-01-20 Thread baydap
Hi. I have a question about the taylor.diagram() in plotrix package. How can I control the label correlation? In the embedded figure you can see the label correlation is too close to the ticks. How can I move it and make it larger? Another problem is the labels 0.95 and 0.99 are too close to the

Re: [R] forecasting a time series

2012-01-20 Thread nhomeier
Hi Michael, I think you're right, I should be looking for predict instead of forecast. I'm still fairly new to R so often don't know what to look for. As a simplified example (let's neglect the fourier terms): fit = auto.arima(data) but now I have data.latest, so I want to use the ARIMA terms

Re: [R] colored outliers

2012-01-20 Thread Geophagus
Dear Petr and Justin, my problem ist, that I only want to have the 4 highest values for Ni as a red point or with a red circle. The other points should not be modificated. In your proposals always all points get a red circle or a red point not only the 4 highest Ni values! I hope you could

[R] Stacked barchart in ggplot (or other library)

2012-01-20 Thread Bart6114
Hey, I want to create a stacked barchart in R for the following dataset (http://pastebin.com/pyHUNgr2): # usage capacitydiff 1 4 10 6 2 2 20 18 3 5 10 5 The stacked barchart should, in one plot show each

[R] Incorrect DateTime using ISOdatetime in R

2012-01-20 Thread Sula2011
Dear list, I need to transform the DateTime of my GPS data from: 666.1751 into /mm/dd hh:mm:ss I have the following code: d$Date - ISOdatetime(2009, 1, 1, 0, 0, 0, tz = GMT)+d$Date*(24*3600) This gives me: 2010-10-29 04:12:09, which is wrong. It should be 2010-10-29 06:12:09 Another

[R] break an axis.POSIXct

2012-01-20 Thread Christof Kluß
Hi I like to use axis.POSIXct to plot days from 2006 till 2008. But I only have datas for the summer months. Is it possible to get two axis breaks, to have not so long distances without points? thx Christof __ R-help@r-project.org mailing list

[R] free memory in large list?

2012-01-20 Thread Michael
Hi all, Lets say I have a huge list which is indexed in the following format: mylist[[i]][[j]][[k]] where the size is 100 x 100 x 10 If I want to set mylist[[2]][[3]]=NULL How do I free the memory used by that sub-list? Thanks a lot! [[alternative HTML version deleted]]

Re: [R] colored outliers

2012-01-20 Thread Justin Haynes
TOC_NI-read.csv2(C:/Users/hilliges/Desktop/Master/Daten/Statistik/TOC-NI.csv, sep=;, dec=,, encoding=UTF-8) circ-TOC_NI[order(TOC_NI$NI,decreasing=T),][1:4,] plot(NI~TOC,data=TOC_NI,col=blue, pch=16, xlim=c(0,450)) abline(lm(NI~TOC,data=TOC_NI),col = red,lwd=3)

Re: [R] free memory in large list?

2012-01-20 Thread Jeff Newmiller
?gc --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#..

Re: [R] break an axis.POSIXct

2012-01-20 Thread Jeff Newmiller
It may be possible, but perhaps not a good idea. A better approach would be to use multiple graphs (panels in lattice or facets in ggplot2). Provide a reproducible example and you might get a more concrete example. --- Jeff

Re: [R] break an axis.POSIXct

2012-01-20 Thread David Winsemius
On Jan 20, 2012, at 10:46 AM, Christof Kluß wrote: Hi I like to use axis.POSIXct to plot days from 2006 till 2008. But I only have datas for the summer months. Is it possible to get two axis breaks, to have not so long distances without points? There are worked examples of broken axes in

[R] z-transform each column of a data.frame

2012-01-20 Thread Martin Batholdy
Hi, I am currently trying to z-transform (that is subtracting the mean and divide by the standard deviation) multiple columns of a data.frame at the same time. My first approach was: x - data.frame(c(0:10), c(10:20)) (x - colMeans(x)) / apply(x, 2, sd) This is obviously not working. Is

[R] arc length of noisy time series?

2012-01-20 Thread John Williams
Hi, I have data of the form: tx y trip t1x1+e y1+eA t2x2+e y2+eA t3x3+e y3+eB t4x4+e y4+eB t5x5+e y5+eB ... ... ... ... where t is time

Re: [R] z-transform each column of a data.frame

2012-01-20 Thread Peter Langfelder
On Fri, Jan 20, 2012 at 9:04 AM, Martin Batholdy batho...@googlemail.com wrote: Hi, I am currently trying to z-transform (that is subtracting the mean and divide by the standard deviation) multiple columns of a data.frame at the same time. My first approach was: x - data.frame(c(0:10),

Re: [R] z-transform each column of a data.frame

2012-01-20 Thread Gavin Simpson
On Fri, 2012-01-20 at 18:04 +0100, Martin Batholdy wrote: Hi, I am currently trying to z-transform (that is subtracting the mean and divide by the standard deviation) multiple columns of a data.frame at the same time. My first approach was: x - data.frame(c(0:10), c(10:20)) (x -

Re: [R] z-transform each column of a data.frame

2012-01-20 Thread R. Michael Weylandt
? scale apply(x, 2, scale) Michael On Fri, Jan 20, 2012 at 12:04 PM, Martin Batholdy batho...@googlemail.com wrote: Hi, I am currently trying to z-transform (that is subtracting the mean and divide by the standard deviation) multiple columns of a data.frame at the same time. My first

Re: [R] z-transform each column of a data.frame

2012-01-20 Thread Martin Batholdy
great, thank you! On 20.01.2012, at 18:10, R. Michael Weylandt wrote: ? scale apply(x, 2, scale) Michael On Fri, Jan 20, 2012 at 12:04 PM, Martin Batholdy batho...@googlemail.com wrote: Hi, I am currently trying to z-transform (that is subtracting the mean and divide by the

Re: [R] Incorrect DateTime using ISOdatetime in R

2012-01-20 Thread Luke Miller
666.1751 sure seems like it should return 2010-10-29 04:12:09 based on your example. 666.1751 days from 2009-01-01 is 2010-10-29 + some hours/min/seconds. 0.1751 days * 24 hrs/day = 4.2024 (i.e. 4:00AM + some minutes). 0.2024 hours * 60 min/hr = 12.144 (i.e. 12 minutes + some seconds). 0.144

Re: [R] z-transform each column of a data.frame

2012-01-20 Thread Steve Lianoglou
Hi Martin, On Fri, Jan 20, 2012 at 12:04 PM, Martin Batholdy batho...@googlemail.com wrote: Hi, I am currently trying to z-transform (that is subtracting the mean and divide by the standard deviation) multiple columns of a data.frame at the same time. My first approach was: x -

Re: [R] z-transform each column of a data.frame

2012-01-20 Thread William Dunlap
If you use apply the result will be a matrix, not a data.frame. You could use a for loop for(j in seq_len(ncol(x))) { x[,j] - scale(x[,j]) } or the odd looking x[] - lapply(x, scale) to scale all the columns and keep x a data.frame. Bill Dunlap Spotfire, TIBCO Software wdunlap

Re: [R] question re. package playwith not able to run command getting error message that I'm attempting to use non function

2012-01-20 Thread Farhat Maha
Thanks for your reply Michael, gwindow() command does work. and here is my sessionInfo gwindow() guiWidget of type: gWindowRGtk for toolkit: guiWidgetsToolkitRGtk2 *(opens a window)* sessionInfo() R version 2.14.1 (2011-12-22) Platform: i486-pc-linux-gnu (32-bit) locale: [1]

Re: [R] Incorrect DateTime using ISOdatetime in R

2012-01-20 Thread Daniel Nordlund
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Sula2011 Sent: Friday, January 20, 2012 7:00 AM To: r-help@r-project.org Subject: [R] Incorrect DateTime using ISOdatetime in R Dear list, I need to transform the DateTime

Re: [R] R package dev: how to export constant?

2012-01-20 Thread Uwe Ligges
So you are still unable to cite the previous part of the thread? On 19.01.2012 00:13, Jonas Stein wrote: Jonas, I've just seen your function 'sistring' code and it's different from the code in Thanks a lot for reporting this bug. It is fixed now in the git repository. I added some examples,

Re: [R] rsp

2012-01-20 Thread Uwe Ligges
On 20.01.2012 09:01, Ashy wrote: Could anyone please tell how to pass parameters of form to server in rsp? Could you please ask questions that are semantically understandable and additionally read the posting guide? Thanks, Uwe Ligges -- View this message in context:

Re: [R] Contour plot on a triangular mesh

2012-01-20 Thread Uwe Ligges
Not sure if I understand the question: If you have more data the grid produced by image() or contour() will be finer anyway... Perhaps we just need an example what you are actually asking for. Uwe Ligges On 20.01.2012 13:28, Roary wrote: Hi All, I have 3 variables which present a perfect

[R] extract fixed width fields from a string

2012-01-20 Thread Sam Steingold
Hi, I have a data frame with one column containing string of the form ABC...|XYZ... where ABC etc are fields of 6 alphanumeric characters each and XYZ etc are fields of 8 alphanumeric characters each; | is a mandatory separator; I do not know in advance how many fields of each kind will each row

Re: [R] extract fixed width fields from a string

2012-01-20 Thread Sarah Goslee
Reproducible example, please. This doesn't make a whole lot of sense otherwise. On Fri, Jan 20, 2012 at 1:52 PM, Sam Steingold s...@gnu.org wrote: Hi, I have a data frame with one column containing string of the form ABC...|XYZ... where ABC etc are fields of 6 alphanumeric characters each

Re: [R] extract fixed width fields from a string

2012-01-20 Thread Bert Gunter
Sam: On Fri, Jan 20, 2012 at 10:52 AM, Sam Steingold s...@gnu.org wrote: Hi, I have a data frame with one column containing string of the form ABC...|XYZ... where ABC etc are fields of 6 alphanumeric characters each and XYZ etc are fields of 8 alphanumeric characters each; | is a mandatory

[R] Estimation of the mode

2012-01-20 Thread Javier xyz
Hi all, I am trying to estimate the mode of a 4-dimensional nonparametric density estimator (any) using a sample of size n=10,000. I have tried using the package 'ks' and 'np' but they are extremely slow; this is related to the estimation of the bandwidth matrix. I also checked the package

[R] Date seq question

2012-01-20 Thread cameron
Can anyone please help me with this? I have a list of business dates. What I want is to have last day of last month and paste them on next month. What i haveWhat i want 5725 2011-09-22 5726 2011-09-23 5727 2011-09-26 5728 2011-09-27 5729 2011-09-28 5730 2011-09-29 5731

[R] Read Analyze Google spreadsheets

2012-01-20 Thread Peter Berntsen
Hi, Would like to analyze this survey: https://docs.google.com/spreadsheet/ccc?key=0Al8vE0D1FPpldEVKWEpZalVELXRhdXo1RU5pTXJWUlE I know how to read in the data like this: require(RCurl) myCsv -

[R] abline by groups

2012-01-20 Thread Sam Chand
Hello, I have 2 variables - x and y, that belong to separate groups. I want to plot all the x and y together, but show separate abline for each group. It can be done in ggplot2, but is there a simpler way to draw ablines by group? e.g., mydata - data.frame(x = 1:20+rnorm(20, -3, 1), y =

[R] fit Johnson Sb with fitdist(method=mme)

2012-01-20 Thread Tatsiana Dudzina
Dear R-helpers, I am trying to fit my data to a 4-parameter lognormal distribution (aka Johnson Sb dist) with fitdist function from the library(fitdistrplus). So far, I have learnt that with mle method it's not always possible to estimate the gamma and delta parameters even if the bounding

[R] abline by groups

2012-01-20 Thread Sam Chand
Hello, I have 2 variables - x and y, that belong to separate groups. I want to plot all the x and y together, but show separate abline for each group. It can be done in ggplot2, but is there a simpler way to draw ablines by group? e.g., mydata - data.frame(x = 1:20+rnorm(20, -3, 1), y =

Re: [R] Date seq question

2012-01-20 Thread R. Michael Weylandt
Try this: date - c(9/22/2011,9/23/2011,9/26/2011,9/27/2011,9/28/2011,9/29/2011,9/30/2011,10/17/2011, 10/18/2011,10/19/2011,10/20/2011,10/21/2011,10/24/2011,10/25/2011,10/26/2011,11/17/2011,11/18/2011,11/21/2011,11/22/2011,11/23/2011,11/25/2011,11/28/2011,11/29/2011,11/30/2011,

Re: [R] abline by groups

2012-01-20 Thread Uwe Ligges
On 20.01.2012 16:38, Sam Chand wrote: Hello, I have 2 variables - x and y, that belong to separate groups. I want to plot all the x and y together, but show separate abline for each group. It can be done in ggplot2, but is there a simpler way to draw ablines by group? e.g., mydata-

Re: [R] abline by groups

2012-01-20 Thread Richard M. Heiberger
I believe you are looking for analysis of covariance. I recommend the ancova function in the HH package. ## install.packages(HH) ## if needed library(HH) tmp - ancova(y ~ x + group, data=mydata) tmp ## You suggested that you want the superpose panel. You can get ## that on a single page with

[R] Building R on RHEL 5

2012-01-20 Thread Erik Wright
Hello, I am trying to upgrade to the latest R release on a machine running Red Hat el5.  Previously I was successful at building R 2.11, but now I am having troubles with R 2.14. Configure goes fine, but then make throws a lot of errors (output below).  Any idea what I am doing wrong this

Re: [R] Estimation of the mode

2012-01-20 Thread Bert Gunter
You realize, I trust, that the mode of a continuous distribution has no meaning without prior specification of the distribution, which, for a fitted density estimate would mean specification of the fitting parameters (bandwidth, etc.) at a minimum. So perhaps you need to rethink what you are

Re: [R] extract fixed width fields from a string

2012-01-20 Thread Sam Steingold
On Fri, Jan 20, 2012 at 14:05, Sarah Goslee sarah.gos...@gmail.com wrote: then I need to convert each 6/8 character string into an integer base 36 or 64 (depending on the field) - how? base 36? 10 decimal digits + 26 english characters = 36.

Re: [R] extract fixed width fields from a string

2012-01-20 Thread Sam Steingold
On Fri, Jan 20, 2012 at 14:05, Sarah Goslee sarah.gos...@gmail.com wrote: Reproducible example, please. This doesn't make a whole lot of sense otherwise. here is the string: 1288915200|070400905a0A118 I want the following data extracted from it: 1. the decimal number before |:

Re: [R] Stacked barchart in ggplot (or other library)

2012-01-20 Thread Jean V Adams
Bart6114 wrote on 01/20/2012 08:54:39 AM: Hey, I want to create a stacked barchart in R for the following dataset (http://pastebin.com/pyHUNgr2): # usage capacity diff 1 4 10 6 2 2 20 18 3 5 10 5 The stacked barchart should, in one plot show each

Re: [R] Bayesian data analysis recommendations

2012-01-20 Thread H. T. Reynolds
You might look at John Kruschke's book, Doing Bayesian Data Analysis (AP), which starts with basics and goes from there. It also relies on R and Bugs. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] extract fixed width fields from a string

2012-01-20 Thread jim holtman
Here part of it. This is the conversion of base 36 to numeric that is case insensitive. This makes use of mapping the alphabetics to characters that start just after '9' and then doing the conversion. You can extend it to base 64 using the same approach. base36ToInteger - function (Str) + { +

Re: [R] extract fixed width fields from a string

2012-01-20 Thread Petr Savicky
On Fri, Jan 20, 2012 at 03:14:21PM -0500, Sam Steingold wrote: On Fri, Jan 20, 2012 at 14:05, Sarah Goslee sarah.gos...@gmail.com wrote: then I need to convert each 6/8 character string into an integer base 36 or 64 (depending on the field) - how? base 36? 10 decimal digits + 26

Re: [R] Stacked barchart in ggplot (or other library)

2012-01-20 Thread Justin Haynes
to use ggplot: dat-data.frame(num=1:3,usage=c(4,2,5),cap=c(10,20,10),diff=c(6,18,5)) dat.melt-melt(dat,id.var=c('num','cap')) ggplot(dat.melt)+geom_bar(aes(x=num,y=value,fill=variable),stat='identity') On Fri, Jan 20, 2012 at 12:30 PM, Jean V Adams jvad...@usgs.gov wrote: Bart6114 wrote on

Re: [R] Contour plot on a triangular mesh

2012-01-20 Thread Roary
I have two observed categorical variables X1 and X2, with X3=X1+X2, and a continuous response Y. I can interpolate the surface and construct an ordinary 2D square contour plot (with X1,X2 axes and X3 on the diagonal). However, I would like to change the orientation of the plot so that the axes

Re: [R] Estimation of the mode

2012-01-20 Thread Javier xyz
Thanks for your reply. The advantage of nonparametric statistics is that you do not need to specify the distribution because the estimator (e.g. kernel estimator) converges to the true density as the number of observations converges to infinite. The mode in this case is the maximum of this

Re: [R] Incorrect DateTime using ISOdatetime in R

2012-01-20 Thread Julia Sommerfeld
Hi Luke, Thank you for the answer. On 20/01/2012, at 6:11 , Luke Miller wrote: 666.1751 sure seems like it should return 2010-10-29 04:12:09 based on your example. 666.1751 days from 2009-01-01 is 2010-10-29 + some hours/min/seconds. 0.1751 days * 24 hrs/day = 4.2024 (i.e. 4:00AM + some

[R] rbind()

2012-01-20 Thread Fred G
Hello there, Much thanks in advance for any help. I have a few questions: 1) Why do I keep getting the following error: File1 - read.csv(../RawData/File1.csv,as.is=TRUE,row.names=1) Error in file(file, rt) : cannot open the connection In addition: Warning message: In file(file, rt) : cannot

Re: [R] rbind()

2012-01-20 Thread Sarah Goslee
Hi Fred, It seems you don't have an rbind() problem, but a path problem. The error you're getting means R can't find your file. When specifying a relative path, as you do with ../RawData/File1.csv it's relative to your current working directory, not necessarily the directory where your script

Re: [R] Date seq question

2012-01-20 Thread Brian Diggs
On 1/20/2012 9:12 AM, cameron wrote: Can anyone please help me with this? I have a list of business dates. What I want is to have last day of last month and paste them on next month. What i haveWhat i want 5725 2011-09-22 5726 2011-09-23 5727 2011-09-26 5728 2011-09-27

Re: [R] Incorrect DateTime using ISOdatetime in R

2012-01-20 Thread Luke Miller
You're running into time zone issues. If you're in a time zone that recognizes daylight savings time for part of the year, the difference in the value you calculate and the expected answer will vary. Check your current system timezone: Sys.timezone() If it doesn't return UTC (aka GMT), you're

[R] Get default values of a function argument

2012-01-20 Thread Helios de Rosario
Hi, a quick question: Is there a way to retrieve the default value of a function argument - if it exists? (I know I can see it if I type the function name, but I would like get the value programaticaly.) Thanks, -- Helios de Rosario Martínez Researcher INSTITUTO DE BIOMECÁNICA DE

Re: [R] Get default values of a function argument

2012-01-20 Thread David Winsemius
On Jan 20, 2012, at 6:26 PM, Helios de Rosario wrote: Hi, a quick question: Is there a way to retrieve the default value of a function argument - if it exists? (I know I can see it if I type the function name, but I would like get the value programaticaly.) ?formals -- David Winsemius,

Re: [R] Get default values of a function argument

2012-01-20 Thread Helios de Rosario
That's exactly what I wanted. Thanks! Helios El día 21/01/2012 a las 0:33, David Winsemius dwinsem...@comcast.net escribió: On Jan 20, 2012, at 6:26 PM, Helios de Rosario wrote: Hi, a quick question: Is there a way to retrieve the default value of a function argument - if it exists? (I

Re: [R] rbind()

2012-01-20 Thread MacQueen, Don
As Sarah said, you have a path problem. Are you saying that RawData is a sub-folder (sub-directory) of SampleProject? And you are running the script with the working directory set to SampleProject? [check using getwd() as Sarah suggested] If so, it looks like it would work if you use

Re: [R] Building R on RHEL 5

2012-01-20 Thread Jason Edgecombe
Why not use the pre-compiled RPM's from EPEL ( http://fedoraproject.org/wiki/EPEL )? Version 2.14 of R is still in the testing folder here: http://download.fedora.redhat.com/pub/epel/testing/5/ Jason On 01/20/2012 02:34 PM, Erik Wright wrote: Hello, I am trying to upgrade to the latest R

Re: [R] Contour plot on a triangular mesh

2012-01-20 Thread Jason Edgecombe
I'm not sure if this is appropriate. If the sum of your variables is always the same constant, then you might try a Ternary plot ( http://en.wikipedia.org/wiki/Ternary_plot ). The vcd package can make ternary plots. On 01/20/2012 02:56 PM, Roary wrote: I have two observed categorical

Re: [R] Date seq question

2012-01-20 Thread cameron
Thanks Michael and Brian Thanks for your time. -- View this message in context: http://r.789695.n4.nabble.com/Date-seq-question-tp4313861p4314793.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] Bayesian data analysis recommendations

2012-01-20 Thread wibeasley
Even if you're not doing medical research, I like a lot about Spiegelhalter's book: http://www.amazon.com/Bayesian-Approaches-Health-Care-Evaluation-Statistics/dp/0471499757/ref=sr_1_1?ie=UTF8qid=1327112075sr=8-1 For interacting with R and JAGS/BUGS my two favorite books that cover theory are

[R] Announce: Summer Program in Data Analysis (SPIDA) 2012

2012-01-20 Thread Michael Friendly
The Institute for Social Research (ISR) and its Statistical Consulting Service (SCS) at York University are pleased to announce our Summer Program In Data Analysis (SPIDA) for 2012. The Program runs from May 24th to June 1st, 2012.This year’s Program focuses on the theory and practice of linear

[R] 4th corner analysis ade4 - what do the colors mean

2012-01-20 Thread Stephen Sefick
I have used the fourthcorner function as suggest by dray and legendre (model 2 and 4 then combine). I plot the combined value with plot(four.comb, type=G). What do the colors mean? I have both grey and black bars. many thanks, Stephen -- Stephen Sefick

Re: [R] question re. package playwith not able to run command getting error message that I'm attempting to use non function

2012-01-20 Thread R. Michael Weylandt
I can't replicate the problem on my system (OS X) and I don't know enough about the Gtk + tcltk frameworks to help diagnose it outside of R -- it might be worth working up a minimal (non-)working example along the lines of: michaelweylandt$ R --vanilla library(playwith) playwith(plot(1:10))

Re: [R] Split values in vector

2012-01-20 Thread Rui Barradas
Hello, Maybe it's no longer needed but, another way would be the function below. It's more complicated because you don't need to know that there are only for categories. Only the original form and the wanted output. fun - function(x, var.to.transform){ f - function(x, nm){

Re: [R] 4th corner analysis ade4 - what do the colors mean

2012-01-20 Thread Mark Difford
On Jan 21, 2012; 7:39am stephen sefick wrote: I plot the combined value with plot(four.comb, type=G). What do the colors mean? I have both grey and black bars. The help file for fourthcorner plainly tells you (sub Details). You can also work out the meaning by looking at the summary