Re: [R] Zoom in in a plot

2010-10-27 Thread Alaios
Actually I want to see how close are some point to a line segment so I want to use some zoom lenses and zoom in and out into different parts of the plot and see how some places look like. Best Regards From: Greg Snow greg.s...@imail.org Sent: Tue,

Re: [R] installing ONLY the documentation files (Rd) for many packages?

2010-10-27 Thread Prof Brian Ripley
On Tue, 26 Oct 2010, Kjetil Halvorsen wrote: I have been searching the documentation for some time nmow, but cannot find it. It must be possible to download packages (many), but only install the help system? I am not sure what you actally want: R CMD INSTALL does not install the Rd files --

[R] [R-pkgs] Introducing the futile.paradigm, a package for functional dispatching in R

2010-10-27 Thread Nurometic R Help
Hello useRs, I'm pleased to announce the general availability of the R package futile.paradigm, which is a language extension that implements functional dispatching in R. This is an alternative to the current object-oriented styles, replacing them with a functional programming style that provides

Re: [R] cube root of a negative number

2010-10-27 Thread Prof Brian Ripley
In this particular case it is part of the C99 stanadrd (7.12.7.4) for the 'pow' function R uses. On Wed, 27 Oct 2010, Berwin A Turlach wrote: G'day Gregory, On Tue, 26 Oct 2010 19:05:03 -0400 Gregory Ryslik rsa...@comcast.net wrote: Hi, This might be me missing something painfully obvious

Re: [R] Feedback on you manual

2010-10-27 Thread Gavin Simpson
On Fri, 2010-10-22 at 23:18 -0700, 刘力平 wrote: Dear Sir/Madam: Great thanks for R project and you contribution. I am Liping Liu, a beginner of R. Recently, I use R much. I wish you could improve the manual by making it search engine friendly. The Introduction to R page is too long. I am

Re: [R] anomalies with the loess() function

2010-10-27 Thread Gavin Simpson
On Tue, 2010-10-26 at 13:29 -0700, Peter Ehlers wrote: On 2010-10-26 11:48, Jonathan P Daily wrote: ?loess use this instead: If you change this: fit- loess(b~a) to be this: fit - loess(b~a, na.action = na.exclude) then this: lines(a, predict(fit)) will work. G I don't think

Re: [R] anomalies with the loess() function

2010-10-27 Thread Gavin Simpson
On Tue, 2010-10-26 at 20:04 +0200, Federico Bonofiglio wrote: Hello Masters, snip / #I generate 2 fictious vectors a-sample(c(sample(1:1000,100),rep(NA,50))) b-sample(c(sample(1:1000,100),rep(NA,50))) snip / a-na.omit(a) b-na.omit(b) #check out the evidence.something's wrong with

Re: [R] GAM function in mgcv package

2010-10-27 Thread Gavin Simpson
On Wed, 2010-10-27 at 12:54 +1000, Lorenzo Cattarino wrote: Hi R-users I am trying to use the GAM function of the mgcv package. But I am having problem trying to specify the k parameter. Is there a specific reason to supply k? Although I managed to run some models by giving to the parameter

[R] multiple text or string searches

2010-10-27 Thread makhdoomi
Dear all, how can i search multiple text or string patterns in a text file. i have written the following script but it is for only single searches at a time. how can i get multiple searches e.g xyz,abc,pqr.at a time and can save the results to an out file. script:: x- abc z-NULL;for (i in

Re: [R] anomalies with the loess() function

2010-10-27 Thread Gavin Simpson
On Wed, 2010-10-27 at 08:26 +0100, Gavin Simpson wrote: On Tue, 2010-10-26 at 13:29 -0700, Peter Ehlers wrote: On 2010-10-26 11:48, Jonathan P Daily wrote: ?loess use this instead: If you change this: fit- loess(b~a) to be this: fit - loess(b~a, na.action = na.exclude)

Re: [R] Data.frame Vs Matrix Vs Array: Definitions Please

2010-10-27 Thread Ivan Calandra
Hi, Gabor gave you a great answer already. But I would add a few precisions. Someone please correct me if I'm wrong. Arrays are matrices with more than 2 dimensions. Put the other way: matrices are arrays with only 2 dimensions. I would also add these: - the components of a vector have to

[R] Control of axis limits in multiple panel lattice plots

2010-10-27 Thread Peter Davenport
Unwanted space (padding?) is introduced at the extremes of the x and y axes of my lattice plots. I've tried defining the scales using xlim, scale and num.limits in x.scale.components, but haven't succeded in getting overriding the introduction of extra space. Here's the problem:

[R] formula in nlmer function of lme4 package

2010-10-27 Thread bernardsfr
Hi, I am trying to fit a simple mixed Emax model with lme4 package (R version 2.12.0), with the following code: nlmer(Y~exp(EM)*C/(exp(EC)+C) ~(EM+EC|subject),start=c(EM=0.1,EC=-0.2),data=tableau) and I have the error code in return: Erreur dans nlmer(Y ~ exp(EM) * C/(exp(EC) + C) ~ (EM + EC |

[R] plot by cathegories within a factor

2010-10-27 Thread Rosario Garcia Gil
Hello I have a data set summarized like this: File name= Height Group Ind Age Trait 1 1 1 20 1 1 2 21 1 2 1 22 1 2 2 21 1 3 1 24 1 3 2 45 1 4 1 23 1 4 2 26 2

[R] FYI: The First Cloud Portal to “R”

2010-10-27 Thread Mario Valle
I have found this on HPC in the Cloud. Maybe could be of interest to someone. SC10 Disruptive Technology Preview: The First Cloud Portal to “R” and Beyond http://www.hpcinthecloud.com/features/SC10-Disruptive-Technology-Preview--The-First-Cloud-Portal-to-R-and-Beyond-105776458.html Enjoy!

[R] Path analysis with logistic regression

2010-10-27 Thread Mohamed Lajnef
Dear all, I would like to make a path analysis after retrieving relevant variables (continuous or binary) after logistic regression. So I try to model the dependent variable (0/1) based on the significant predictors using path analysis Could you tell me if there is a suitable package in R to

Re: [R] trouble with histograms

2010-10-27 Thread Peter Ehlers
On 2010-10-26 22:00, Marcel Curlin wrote: Hi, I have tab-delimited data with an unequal number of entries per column, of the sort: A B C 1 2 2 3 4 1 5 2 2 6 2 5 2 3 6 2 I would like to make a histogram of the frequencies of each represented number in a stacked histogram,

[R] return NA instead zero when summing over an empty range?

2010-10-27 Thread Martin Ivanov
Dear R users, the colSums function from the base package returns zero if there are no values in a range to be summed over (after removing missing values with na.rm = TRUE). Is there some way to make it return NA in that case just like colMeans does? Or any other function or some good way to

Re: [R] Data.frame Vs Matrix Vs Array: Definitions Please

2010-10-27 Thread Gabor Grothendieck
On Wed, Oct 27, 2010 at 4:03 AM, Ivan Calandra ivan.calan...@uni-hamburg.de wrote: Hi, Gabor gave you a great answer already. But I would add a few precisions. Someone please correct me if I'm wrong. Arrays are matrices with more than 2 dimensions. Put the other way: matrices are arrays

Re: [R] to determine the variable importance in svm

2010-10-27 Thread Neeti
thank you so much for your suggestion, i will use caret package is ipred:errorest method is good enough for validating (or cross check) my svm result? -- View this message in context: http://r.789695.n4.nabble.com/to-determine-the-variable-importance-in-svm-tp3013817p3015172.html Sent from the

Re: [R] plot by cathegories within a factor

2010-10-27 Thread Ivan Calandra
Hi, The best I've found (but definitely not the best!): x - read.table(textConnection(Group Ind Age Trait 1 1 2 21 1 2 1 22 1 2 2 21 1 3 1 24 1 3 2 45 1 4 1 23 1 4 2 26 2 1 1 45 2 1 2 12 2 2 1 25 2 2 2 26 2 3 1 45 2 3 2 43 2 4 1 23 2 4 2 47 ), header=T) str(x) 'data.frame': 15 obs. of 4

[R] reading multiple XML files into an R table

2010-10-27 Thread Jørgen Blystad Houge
Good morning fellow R users! I need to read multiple .XML files now gathered in one folder and collect them in a table in R. The files have only numeric names and are named nearly continuously (e.g 1.xml, 2.xml, 3.xml . up to about 4.xml) but with a few missing numbers/files. So the code

Re: [R] Chron object in time series plot

2010-10-27 Thread Manta
Ok, so you may be right, but I do not understand why ;) The commands you suggested are applied to temp_plot, where temp_plot is a 'zoo' object as follows (there is actually something strange in here, if I just want to see the whole object I do not get the warning message that I got when

[R] R at Supercomputing 10

2010-10-27 Thread Bjørn-Helge Mevik
SC10 Disruptive Technology Preview: The First Cloud Portal to “R” and Beyond http://www.hpcinthecloud.com/features/SC10-Disruptive-Technology-Preview--The-First-Cloud-Portal-to-R-and-Beyond-105776458.html?viewAll=y (My apologies if ths has been posted already.) -- Bjørn-Helge Mevik

[R] One silly question about tapply output

2010-10-27 Thread Vincy Pyne
Dear R helpers I have a data which gives Month-wise and Rating-wise Rates. So the input file is something like month   rating   rate January    AAA 9.04 February  AAA             9.07 ..

Re: [R] return NA instead zero when summing over an empty range?

2010-10-27 Thread Duncan Murdoch
On 27/10/2010 6:08 AM, Martin Ivanov wrote: Dear R users, the colSums function from the base package returns zero if there are no values in a range to be summed over (after removing missing values with na.rm = TRUE). Is there some way to make it return NA in that case just like colMeans

Re: [R] Chron object in time series plot

2010-10-27 Thread Gabor Grothendieck
On Wed, Oct 27, 2010 at 6:23 AM, Manta mantin...@libero.it wrote: Ok, so you may be right, but I do not understand why ;) The commands you suggested are applied to temp_plot, where temp_plot is a 'zoo' object as follows (there is actually something strange in here, if I just want to see the

[R] install RSPerl on Fedora

2010-10-27 Thread L
Hi I have R 2.11.1 installed at Fedora 13. when I tried to install RSPerl by command line sudo R CMD INSTALL ~/Download/RSPerl_0.92-1.tar.gz It failed with following errors, could some one offer help? Thanks Yuan Converters.c: In function ‘PerlAllocHomogeneousVector’: Converters.c:1003: error:

Re: [R] plot by cathegories within a factor

2010-10-27 Thread Peter Ehlers
On 2010-10-27 03:17, Ivan Calandra wrote: Hi, The best I've found (but definitely not the best!): x- read.table(textConnection(Group Ind Age Trait 1 1 2 21 1 2 1 22 1 2 2 21 1 3 1 24 1 3 2 45 1 4 1 23 1 4 2 26 2 1 1 45 2 1 2 12 2 2 1 25 2 2 2 26 2 3 1 45 2 3 2 43 2 4 1 23 2 4 2 47 ), header=T)

[R] Best IDE for R

2010-10-27 Thread Santosh Srinivas
Dear R-Group, I am looking for suggestions for the best IDE for R. Best is obviously subjective but I need just the basic features that should function well (and I looked through the threads already). - Proper integration with R 2.11.1 - Good key shortcuts ... similar to the R Gui - Manageability

Re: [R] to determine the variable importance in svm

2010-10-27 Thread mxkuhn
is ipred:errorest method is good enough for validating (or cross check) my svm result? Yes, if you know what values of the tuning parameters to use, but I don't know why it was failing. Max __ R-help@r-project.org mailing list

Re: [R] Best IDE for R

2010-10-27 Thread Duncan Murdoch
On 27/10/2010 7:01 AM, Santosh Srinivas wrote: Dear R-Group, I am looking for suggestions for the best IDE for R. Best is obviously subjective but I need just the basic features that should function well (and I looked through the threads already). - Proper integration with R 2.11.1 -

[R] How Plot, Axis and Rect work together?

2010-10-27 Thread Alaios
Hello everyone, I am trying to understand how plot axis and rect might work together I would like to plot some values on a plot with x(0,100) and y(0,100) i want to see all the values from 0,1,2,3,4,5,.100 written in the x and y axis. At the same time I want some grid to easily see when y

Re: [R] Best IDE for R

2010-10-27 Thread Gabor Grothendieck
On Wed, Oct 27, 2010 at 7:01 AM, Santosh Srinivas santosh.srini...@gmail.com wrote: Dear R-Group, I am looking for suggestions for the best IDE for R. Best is obviously subjective but I need just the basic features that should function well (and I looked through the threads already). -

[R] R-Excel Macro mode

2010-10-27 Thread Puijman, R.
I'm using R-Excel's macro mode to make an R based Excel tool for inventory management. It's quite a lot of R-code which I made in R at first and now I am trying to transform it into excel. The R code is a simulation of a random path x times, put into matrices and then doing some transformations

Re: [R] Chron object in time series plot

2010-10-27 Thread Manta
This is the output, thanks again for the help! structure(c(48608, 46686, 55216, 59268, 50967, 55067, 57783, 60021, 61480, 63853, 58267, 72442, 63926, 49102, 74320, 63433, ... 55337, 54919, 63230, 57756, 80296, 58319, 56993, 59161, 56184, 65331, 56179, 61115, 59874, 85050), index =

Re: [R] One silly question about tapply output

2010-10-27 Thread Peter Ehlers
On 2010-10-27 03:39, Vincy Pyne wrote: Dear R helpers I have a data which gives Month-wise and Rating-wise Rates. So the input file is something like month rating rate JanuaryAAA 9.04 February AAA 9.07

Re: [R] multiple text or string searches

2010-10-27 Thread Henrique Dallazuanna
Try this: set.seed(1234) xstr - replicate(100, paste(sample(letters), collapse = '')) patt - c('dmu', 'kpz', 'ajt') sapply(patt, gregexpr, text = xstr) On Wed, Oct 27, 2010 at 5:53 AM, makhdoomi abraufs...@gmail.com wrote: Dear all, how can i search multiple text or string patterns in a

Re: [R] One silly question about tapply output

2010-10-27 Thread Remko Duursma
Or, tap - tapply(rate, rating, mean) data.frame(Rating=as.factor(rownames(tap)), Mean=as.vector(tap)) remko -- View this message in context: http://r.789695.n4.nabble.com/One-silly-question-about-tapply-output-tp3015202p3015274.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Chron object in time series plot

2010-10-27 Thread Gabor Grothendieck
On Wed, Oct 27, 2010 at 7:33 AM, Manta mantin...@libero.it wrote: This is the output, thanks again for the help! structure(c(48608, 46686, 55216, 59268, 50967, 55067, 57783, 60021, 61480, 63853, 58267, 72442, 63926, 49102, 74320, 63433, ... 55337, 54919, 63230, 57756, 80296, 58319, 56993,

Re: [R] One silly question about tapply output

2010-10-27 Thread Vito Muggeo (UniPa)
dear Vincy, Firstly, a suggestion: to increase the probability of getting help, you should provide reproducible code (people can do copy-and-paste of your code and to modify the code to obtain the response.. ) However a possible solution (not tested, of course..) could be simply

[R] Increase R precision

2010-10-27 Thread Alaios
Hello everyone. When I execute the following in R (18-46)/(45-93) [1] 0.583 I get small precision for what I am trying to deal with . Is it possible to increase the precision for this and for other operations? For example openoffice calc for this operation returns

Re: [R] Increase R precision

2010-10-27 Thread stephen sefick
?options On Wed, Oct 27, 2010 at 6:49 AM, Alaios ala...@yahoo.com wrote: Hello everyone. When I execute the following in R (18-46)/(45-93) [1] 0.583 I get small precision for what I am trying to deal with .  Is it possible to increase the precision for this and for other operations?

Re: [R] How Plot, Axis and Rect work together?

2010-10-27 Thread Remko Duursma
Hi Alex, is this what you want? par(xaxs=i, yaxs=i, cex.axis=0.3) plot(1, type='n', ann=FALSE, axes=FALSE,xlim=c(0,100),ylim=c(0,100)) axis(1, at=1:100) axis(2, at=1:100) abline(h=1:100,col=grey) abline(v=1:100,col=grey) X - sample(1:100, 10) Y - sample(1:100, 10) rect(X,Y,X+1,Y+1,col=red)

Re: [R] Increase R precision

2010-10-27 Thread Duncan Murdoch
On 27/10/2010 7:49 AM, Alaios wrote: Hello everyone. When I execute the following in R (18-46)/(45-93) [1] 0.583 I get small precision for what I am trying to deal with . Is it possible to increase the precision for this and for other operations? For example openoffice calc for this

[R] Criteria for individually adressing data ranges within timeseries data

2010-10-27 Thread Alexander Holik
Dear R-Users, my dataset contains timeseries that are structured into task-specific epochs as labelled by a factor and a boolean variable for labelling each data-point within the series as artefact or non-artefact. Now there's no problem in addressing continuous task-specific time-series that

Re: [R] Increase R precision

2010-10-27 Thread Alain Guillet
Hi, It is not a problem of precision but a problem of display. options(digits=15) (18-46)/(45-93) [1] 0.583 Alain On 27-Oct-10 13:49, Alaios wrote: Hello everyone. When I execute the following in R (18-46)/(45-93) [1] 0.583 I get small precision for what I am trying

Re: [R] Chron object in time series plot

2010-10-27 Thread Manta
Here it is: dput(temp_plot) structure(c(48608, 46686, 55216, 59268, 50967, 55067, 57783, 60021, 61480, 63853, 58267, 72442, 63926, 49102, 74320, 63433, 66256, 68483, 67736, 60507, 60888, 78008, 64326, 65665, 57288, 54663, 54984, 54073, 59632, 52523, 55266, 54836, 61408, 53813, 85855, 65204,

Re: [R] Chron object in time series plot

2010-10-27 Thread Gabor Grothendieck
On Wed, Oct 27, 2010 at 8:04 AM, Manta mantin...@libero.it wrote: Here it is: dput(temp_plot) structure(c(48608, 46686, 55216, 59268, 50967, 55067, 57783, 60021, 61480, 63853, 58267, 72442, 63926, 49102, 74320, 63433, 66256, 68483, 67736, 60507, 60888, 78008, 64326, 65665, 57288, ...    

Re: [R] Zoom in in a plot

2010-10-27 Thread Jonathan P Daily
In that case you may wish to look into the rggobi package, which provides an R interface to the ggobi tools. I haven't used it much, but it has a lot of interactive options. -- Jonathan P. Daily Technician - USGS Leetown Science Center 11649 Leetown Road

Re: [R] Increase R precision

2010-10-27 Thread Alaios
So? Do you imply that I do not need to change the precision.. and if yes how to change the default display settings? Best regards Alex From: Alain Guillet alain.guil...@uclouvain.be Cc: Rhelp r-help@r-project.org Sent: Wed, October 27, 2010 1:58:46 PM

Re: [R] install RSPerl on Fedora

2010-10-27 Thread Marc Schwartz
On Oct 27, 2010, at 5:48 AM, L wrote: Hi I have R 2.11.1 installed at Fedora 13. when I tried to install RSPerl by command line sudo R CMD INSTALL ~/Download/RSPerl_0.92-1.tar.gz It failed with following errors, could some one offer help? Thanks Yuan Converters.c: In function

Re: [R] Data.frame Vs Matrix Vs Array: Definitions Please

2010-10-27 Thread Ivan Calandra
My comments are in the text. Le 10/27/2010 12:11, Gabor Grothendieck a écrit : On Wed, Oct 27, 2010 at 4:03 AM, Ivan Calandra ivan.calan...@uni-hamburg.de wrote: Hi, Gabor gave you a great answer already. But I would add a few precisions. Someone please correct me if I'm wrong. Arrays are

Re: [R] Increase R precision

2010-10-27 Thread Alain Guillet
As everybody told you in using options with digits... It exactly is what I made in the sent code. Alain On 27-Oct-10 14:21, Alaios wrote: So? Do you imply that I do not need to change the precision.. and if yes how to change the default display settings? Best regards Alex

Re: [R] Data.frame Vs Matrix Vs Array: Definitions Please

2010-10-27 Thread Dennis Murphy
Hi: I'm going to take a different tack from Gabor and Ivan and be strictly qualitative on the distinctions among vectors, matrices, arrays, data frames and lists. As Ivan mentioned, a vector has a single (atomic) mode - i.e., all elements of a vector must be of the same type. A numeric vector

Re: [R] One silly question about tapply output

2010-10-27 Thread Vincy Pyne
Dear Sirs, Thanks a lot for your great help. This is going to help me immensely in future as many times I had found myself struggling with this problem. Thanks again for the great help. Regards Vincy --- On Wed, 10/27/10, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: From:

Re: [R] Which version control system to learn for managing Rprojects?

2010-10-27 Thread david.jessop
Gabor As someone trying to the rest of my team using Subversion (which I have used for a while, but more as a backup / record of changes), have you a neat / automated way of building a package from a subversion repository? Thanks David Jessop -- David Jessop Global

Re: [R] plot by cathegories within a factor

2010-10-27 Thread Dennis Murphy
Hi: Here's another take with ggplot2: library(ggplot2) # Define the basic plot elements. First argument is the data frame. # aes() refers to the plot's aesthetics, which refer to the variables # mapped to specific 'roles' in the plot 'geoms' g - ggplot(x, aes(x = Age, y = Trait)) g +

Re: [R] Which version control system to learn for managing Rprojects?

2010-10-27 Thread Whit Armstrong
http://hudson-ci.org On Wed, Oct 27, 2010 at 8:49 AM, david.jes...@ubs.com wrote: Gabor As someone trying to the rest of my team using Subversion (which I have used for a while, but more as a backup / record of changes), have you a neat / automated way of building a package from a

Re: [R] Zoom in in a plot

2010-10-27 Thread Michael Lawrence
You might want to check out the Qt stuff we've been working on. The qtutils package has a graphics device that supports zooming and other fun stuff. Also, qtpaint provides a flexible low-level engine for interactive graphics. See: http://github.com/ggobi/qtpaint and

Re: [R] Best IDE for R

2010-10-27 Thread Dennis Murphy
Hi: This topic came up a couple of days ago: http://r.789695.n4.nabble.com/R-file-td3009812.html#a3009812 HTH, Dennis On Wed, Oct 27, 2010 at 4:01 AM, Santosh Srinivas santosh.srini...@gmail.com wrote: Dear R-Group, I am looking for suggestions for the best IDE for R. Best is obviously

[R] as.list

2010-10-27 Thread Sibylle Stöckli
Dear R-users I would like to read a txt file as list, to select rows and columns, and to create barplots. (1) selection of parameter site and part: ok (2) read txt file as list: problem with (1) as there are NA's (the lines not selected) (3) barplot: 5 different groups of bars (the selected

[R] Fwd: as.list

2010-10-27 Thread Sibylle Stöckli
Original-Nachricht Datum: Wed, 27 Oct 2010 15:03:48 +0200 Von: Sibylle Stöckli sibylle.stoec...@gmx.ch An: Rhelp r-help@r-project.org Betreff: as.list Dear R-users sorry, here Rcode included (attachment has been removed) I would like to read a txt file as list, to select rows

Re: [R] Best IDE for R

2010-10-27 Thread Jonathan P Daily
I noticed that nabble link presented Notepad++ as having to copy/paste into the editor. There is a companion to NP++, though, that allows line/file passing directly to an R console, auto-completion, and a bunch of other goodies called NppToR. -- Jonathan P.

[R] as.list rcode

2010-10-27 Thread Sibylle Stöckli
Original-Nachricht Datum: Wed, 27 Oct 2010 15:09:59 +0200 Von: Sibylle Stöckli sibylle.stoec...@gmx.ch An: Rhelp r-help@r-project.org Betreff: Fwd: as.list Original-Nachricht Datum: Wed, 27 Oct 2010 15:03:48 +0200 Von: Sibylle Stöckli sibylle.stoec...@gmx.ch

Re: [R] Conditional looping over a set of variables in R

2010-10-27 Thread David Herzberg
Peter, thanks for this elegant solution that works well and handles the empty cases. However, the vector it returns includes both the row (case) numbers and the target result (number of column of first 1). How can I strip out the row numbers and leave only the target result. Regards, David S.

Re: [R] Which version control system to learn for managing Rprojects?

2010-10-27 Thread Gabor Grothendieck
On Wed, Oct 27, 2010 at 8:49 AM, david.jes...@ubs.com wrote: Gabor As someone trying to the rest of my team using Subversion (which I have used for a while, but more as a backup / record of changes), have you a neat / automated way of building a package from a subversion repository?

Re: [R] Fwd: as.list

2010-10-27 Thread Ivan Calandra
Hi Sibylle, I was about to send you an email, but I'll modify it thanks to your second! Is PA what you expect? Does it contain the data you want? You should provide some sample data. If the importation worked, try to copy/paste the output of dput(PA), which we can then copy/paste in our

[R] non-numeric argument to binary operator error while reading ncdf file

2010-10-27 Thread Charles Novaes de Santana
Hi everyone, I am a newbie in R and in this discussion list. I am trying to use R package ncdf to read values of temperature from a NCDF file. I did it before to another file using the function get.var.ncdf, but now there is an error that I can not solve, and I would really appreciate if you

Re: [R] reading multiple XML files into an R table

2010-10-27 Thread Ista Zahn
Hi Jørgen, You will be better served by learning how to find the answers to these kinds of questions on your own. You can either use a general search engine such as google: http://lmgtfy.com/?q=read+multiple+files+in+R http://lmgtfy.com/?q=read+xml+data+in+R or using an R specific search engine.

Re: [R] Increase R precision

2010-10-27 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 27.10.2010 14:21:14: So? Do you imply that I do not need to change the precision.. and if yes how to change the default display settings? (18-46)/(45-93) [1] 0.583 (18-46)/(45-93)*1e12 [1] 5833 So the computation use machine

Re: [R] Conditional looping over a set of variables in R

2010-10-27 Thread Peter Ehlers
On 2010-10-27 06:21, David Herzberg wrote: Peter, thanks for this elegant solution that works well and handles the empty cases. However, the vector it returns includes both the row (case) numbers and the target result (number of column of first 1). How can I strip out the row numbers and leave

Re: [R] Control of axis limits in multiple panel lattice plots

2010-10-27 Thread Peter Davenport
I've found the solution to this in an old post of Deepayan's: lattice.options(axis.padding = list(numeric=0)) Best, Peter On 27 October 2010 09:28, Peter Davenport pwdavenp...@gmail.com wrote: Unwanted space (padding?) is introduced at the extremes of the x and y axes of my lattice plots.

Re: [R] Data.frame Vs Matrix Vs Array: Definitions Please

2010-10-27 Thread Gabor Grothendieck
On Wed, Oct 27, 2010 at 8:38 AM, Ivan Calandra ivan.calan...@uni-hamburg.de wrote: What I don't understand is why vectors (with more than one value) don't have dimensions. They look like they do have 1 dimension. For me no dimension would be a scalar. Like in geometry: a point has no dimension,

Re: [R] non-numeric argument to binary operator error while reading ncdf file

2010-10-27 Thread jim holtman
put: options(error=utils::recover) in your script so that when an error occurs you are dropped into the 'browser' so that you can examine the variables at that point in time. There are several references on how to use the debugging tools in R that will help you resolve your problem. We can not

Re: [R] non-numeric argument to binary operator error while reading ncdf file

2010-10-27 Thread Charles Novaes de Santana
Thank you for your answer, Jim! I will try it and post what I find. cheers, Charles On Wed, Oct 27, 2010 at 3:46 PM, jim holtman jholt...@gmail.com wrote: put: options(error=utils::recover) in your script so that when an error occurs you are dropped into the 'browser' so that you can

Re: [R] stripping #s in a text file prior to reading into table or dataframe

2010-10-27 Thread Donald Braman
Thanks for your advice! I still get the same error, though -- not sure why. read.table('don.5.clusters.txt', header = TRUE, comment.char = '', quote ='') Error in read.table(don.5.clusters.txt, header = TRUE, comment.char = , : more columns than column names Any other thoughts? --

Re: [R] Data.frame Vs Matrix Vs Array: Definitions Please

2010-10-27 Thread Ivan Calandra
Le 10/27/2010 15:45, Gabor Grothendieck a écrit : On Wed, Oct 27, 2010 at 8:38 AM, Ivan Calandra ivan.calan...@uni-hamburg.de wrote: What I don't understand is why vectors (with more than one value) don't have dimensions. They look like they do have 1 dimension. For me no dimension would be

Re: [R] stripping #s in a text file prior to reading into table or dataframe

2010-10-27 Thread Duncan Murdoch
On 27/10/2010 9:51 AM, Donald Braman wrote: Thanks for your advice! I still get the same error, though -- not sure why. read.table('don.5.clusters.txt', header = TRUE, comment.char = '', quote ='') Error in read.table(don.5.clusters.txt, header = TRUE, comment.char = , : more columns

Re: [R] reading multiple XML files into an R table

2010-10-27 Thread Kjetil Halvorsen
for the loop part: put all your xml files in a directory with no other files, do setwd(directory/with/xml/files) files - list.files() for (file in files) processs the files kjetil 2010/10/27 Ista Zahn iz...@psych.rochester.edu: Hi Jørgen, You will be better served by learning how to find the

[R] ggplot - unwanted sorted X values

2010-10-27 Thread ashz
Hi, I have this script: dat - data.frame(X = halistat$Date,Y1 = halistat$avg,Y2 = halistat$stdev) ggplot(data = dat, aes(x = X, y = Y1, ymin = Y1 - Y2, ymax = Y1 + Y2)) + geom_point() + # points at the means geom_line() + # if you want lines between pints geom_errorbar() # error bars, Y1

[R] trouble opening connection 64bit R with win7 64bit

2010-10-27 Thread Hayes, Daniel
Hi, I just installed R 64bit under Windows 7 64 bit When trying to readin files I get the following error message: source(file=C:\\Users\\me\\Documents\\My PhD\\Modelling\\R\\Scripts\\Functions\\functions 20jan10.r) Error in file(file, rt) : cannot open the connection In addition: Warning

Re: [R] Formatting durations

2010-10-27 Thread Susanta Mohapatra
Thanks Gabor, It is a very tricky task and your comment helped. I modified the function to handle average of two numbers when it is like 2-3 minutes. I also improved on the regex part to parse the decimal parts also. Right now i can parse 100% of one sample. Thanks Susanta On Wed, Oct 27, 2010

[R] Fill in missing times in a timeseries with NA

2010-10-27 Thread lglew
Hi, I have a irregularly spaced time series dataset, which reads in from a .csv. I need to convert this to a regularly spaced time series by filling in missing rows of data with NAs. So my data, called NtuMot, looks like this (I've removed some of the additional rows for simplicity) ELEID

[R] correctness of a formula in lme (from package nlme)

2010-10-27 Thread Dimitri Liakhovitski
Hello! This is a sanity check based on my inexperience with mixed effects models - I'd like to make sure the formula I wrote is correct for what I am trying to do: In my data set MyData, I have a response variable (DV), 8 numeric predictors (a through h) and a factor group with several levels.

Re: [R] Best IDE for R

2010-10-27 Thread Lee Hachadoorian
On Wed, 27 Oct 2010 16:31:30 +0530, Santosh Srinivas wrote: I am looking for suggestions for the best IDE for R. Best is obviously subjective but I need just the basic features that should function well (and I looked through the threads already). - Proper integration with R 2.11.1 - Good key

[R] (no subject)

2010-10-27 Thread Timothy Spier
I am interested in using multcompLetters after running kruskalmc but I'm a newbie and I'm not having luck figuring it out. I can run kruskalmc just fine, but after studying the documentation for multcompletters for a long time, I cannot figure out how to make it work. Any ideas? R input is

Re: [R] Data.frame Vs Matrix Vs Array: Definitions Please

2010-10-27 Thread Gabor Grothendieck
On Wed, Oct 27, 2010 at 10:07 AM, Ivan Calandra ivan.calan...@uni-hamburg.de wrote: Le 10/27/2010 15:45, Gabor Grothendieck a écrit : On Wed, Oct 27, 2010 at 8:38 AM, Ivan Calandra ivan.calan...@uni-hamburg.de  wrote: What I don't understand is why vectors (with more than one value) don't

[R] Regular time series with irregular start and end dates

2010-10-27 Thread Wesley Roberts
Dear R users, I have a quick question regarding creating an index for a zoo object. I am using R 2.12 on winxp. I have read through the R archives searching for information on dates and time series analysis and nothing seems to cover my question. I am extracting data from a time series of

Re: [R] non-numeric argument to binary operator error while reading ncdf file

2010-10-27 Thread Charles Novaes de Santana
Hi, Well, I did it, but all my script was on the first message. I don't have any other variables. I am just reading a NCDF file and trying to read the variable tasmax, that has values of temperatures. The only new information I have is the header of the NCDF file (Spain02D_tasmax.nc), that I

Re: [R] stripping #s in a text file prior to reading into table or dataframe

2010-10-27 Thread Donald Braman
read.delim2 did the trick -- many thanks!!! On Wed, Oct 27, 2010 at 10:01 AM, Jorge Ivan Velez jorgeivanve...@gmail.com wrote: ?read.delim2 HTH, Jorge On Wed, Oct 27, 2010 at 9:51 AM, Donald Braman dbra...@law.gwu.eduwrote: Thanks for your advice! I still get the same error, though --

[R] keep adding elements to the matrix

2010-10-27 Thread Alaios
Hello everyone, I would like to create a dynamic array to keep storing number in it for (i in c(2:length(final))){ myarray -final[i]-final[i-1] myarray2-2*final[i] } At the end I would like to use myarray as the x values of an array and the myarray2 as the yvalues of the same

Re: [R] Regular time series with irregular start and end dates

2010-10-27 Thread Gabor Grothendieck
On Wed, Oct 27, 2010 at 10:01 AM, Wesley Roberts wrobe...@csir.co.za wrote: Dear R users, I have a quick question regarding creating an index for a zoo object. I am using R 2.12 on winxp. I have read through the R archives searching for information on dates and time series analysis and

[R] Y Axis Labels

2010-10-27 Thread Downey, Patrick
Hello, I have am plotting a 0-4 ordinal scale (y-axis) against time (x-axis). Is there a way to label the values on the y-axis with the translation from the scale? That is, instead of having 0,1,2,3,4 on the y-axis, I would like Never, Once per month, A few times per month, A few times per week,

Re: [R] Fitting GLM with BFGS algorithm

2010-10-27 Thread Prof. John C Nash
In the sort of problem mentioned below, the suggestion to put in gradients (I believe this is what is meant by minus score vector) is very important. Using analytic gradients is almost always a good idea in optimization of smooth functions for both efficiency of computation and quality of

Re: [R] ggplot - unwanted sorted X values

2010-10-27 Thread David Winsemius
On Oct 27, 2010, at 5:17 AM, ashz wrote: Hi, I have this script: dat - data.frame(X = halistat$Date,Y1 = halistat$avg,Y2 = halistat $stdev) ggplot(data = dat, aes(x = X, y = Y1, ymin = Y1 - Y2, ymax = Y1 + Y2)) + geom_point() + # points at the means geom_line() + # if you want lines

Re: [R] lineplot.CI {sciplot}: continuous line

2010-10-27 Thread Thomas Levine
It could be more elegant, but I think this does what you want. ... lineplot.CI(blck, perf, group = cnd, xlab=Block, ylab=% Optimal Responses, cex.leg=1.2, x.leg = 18, y.leg=0.4, err.width=0.05, pch = c(15,15), col=c(grey, black), lty=c(1,1), main = Experiments 2 and 3, ylim=c(0.3,1),

Re: [R] coxph linear.predictors

2010-10-27 Thread Bond, Stephen
coef(fit)*model.matrix(fit)[1,1] age 11.69021 I don't know what that might be and you are not telling us what you think it is. I think this the calculation of the linear predictor, multiplying (the beta*X) I expected that coef(fit)*model.matrix(fit)[1,1]=

[R] Merge disparate lists

2010-10-27 Thread Jim Burke
My two lists look like below Need an R code example that combines the two. l_one key 2 1 2 l_two ndx, descr 1, this 2, that 3, other 4, finis My goal is a new list that looks like below. ndx descr 2 that 1 this 2 that Thanks, Jim __

[R] How do I read multiple rows of different lengths?

2010-10-27 Thread smcguffee
Hi, I have a data file with hundreds of rows, with every first, second, third, and fourth line representing a set of numbers for row names x, y, fit, and residuals, respectively. However, any given group of these lines might be from 10 to 2 values long. When I try fits=read.delim2(test)

  1   2   >