Re: [R] Excluding "small data" from plot.

2016-02-17 Thread PIKAL Petr
Hi Please cc your mails to r help. Users are around the world and you could have response oslo from others. You need to put NA in a missing good or bad letter. I would probably do merging instead of do.call but there may be other options. Something like that. > l1<-sample(letters[1:10], 5) >

Re: [R] regression coefficients

2016-02-17 Thread William Dunlap via R-help
> mod_c <- aov(dv ~ myfactor_c + Error(subject/myfactor_c), data=mydata_c) > > summary.lm(mod_c) > Error in if (p == 0) { : argument is of length zero> You called the lm method for summary() on an object of class c("aovlist", "listof"). You should not expect a method for one class to work on an

Re: [R] regression coefficients

2016-02-17 Thread Jim Lemon
Hi Cristiano, Might be the data you have for "dv". I don't seem to get the problem. dv<-sample(1:6,15,TRUE) subject<-factor(rep(paste("s",1:5,sep=""),each=3)) myfactor_c<-factor(rep(paste("f",1:3,sep=""),5)) mydata_c<-data.frame(dv,subject,myfactor_c)

[R] regression coefficients

2016-02-17 Thread Cristiano Alessandro
Dear all, I am trying to visualize the regression coefficients of the linear model that the function aov() implicitly fits. Unfortunately the function summary.lm() throws an error I do not understand. Here is a toy example: dv <- c(1,3,4,2,2,3,2,5,6,3,4,4,3,5,6); subject <-

[R] How to plot gaps in chartSeries

2016-02-17 Thread Jeff Trefftzs
In hopes of isolating parts of a time series where my indicator is above zero I have filled those rows where the indicator is <= 0 with NAs. I was hoping this would leave blank gaps when I plotted using chartSeries(blanked, theme = 'white'), but chartSeries closes up the gaps. ggplot, however,

[R] [R-pkgs] announcing maps version 3.1.0

2016-02-17 Thread Alex Deckmyn
Hi, I am pleased to announce version 3.1.0 of the 'maps' package which has a few important changes and additions. CHANGES: - The 'world' map has been adapted: it now doesn't contain any lakes anymore. Most visible effect is the Great Lakes on the Canada/USA border. - Major lakes are now

Re: [R] Error in cut.default(a, breaks = 100) : 'breaks' are not unique

2016-02-17 Thread Jeff Newmiller
Range of values is a standard mathematical concept, unrelated to the number of values in your data set. Consider using the summary function to learn about the range of your data. Also, read the Posting Guide (which warns you to use pain text in formulating your emails to the list to avoid

Re: [R] Error in cut.default(a, breaks = 100) : 'breaks' are not unique

2016-02-17 Thread Sarah Goslee
It should cover the range of values - from below the minimum to above the maximum of your data. One break would do it, or 10, or whatever. It doesn't matter how many breaks you have, it matters that they have a sufficient range. So you might make breaks like seq(floor(min(x)), ceiling(max(x)),

[R] Error in cut.default(a, breaks = 100) : 'breaks' are not unique

2016-02-17 Thread /ty??????/yl
Dear R users, as my first post for this mailing list, I'd like to ask questions about 'break' in cut.default. I am using pheatmap in RStudio. Pheatmap is a function to draw clustered heatmap in R. According to the manual, breaks is 'a sequence of numbers that covers the range of values in

Re: [R-es] Manejo de ficheros Linux desde R

2016-02-17 Thread Proyecto R-UCA
Hola. Pedro, ¿has valorado la posibilidad de que el script se ejecute con la recepción del correo y no a intervalos periódicos? La utilidad procmail se puede configurar para que lance un ejecutable con la llegada de un correo. De esta forma no harías ejecuciones en vacío (sin nada que procesar)

Re: [R] this is not a list, not a data frame, but what ?

2016-02-17 Thread Bert Gunter
Better: mom["PC_Q_m3","value"] Read about indexing in R . Bert On Tuesday, February 16, 2016, MAURICE Jean - externe < jean-externe.maur...@edf.fr> wrote: > I went further ! > > I could give a name to each row based on column 2 in the read.table > command and then access to the value by :

Re: [R] missing values in csv file

2016-02-17 Thread William Dunlap via R-help
You can add the argument na.print=" " to print() to make the missing values print as " " instead of as NA. Some, but not all print methods support this. E.g., > print(c(1,2,NA,4,5,NA), na.print="-") [1] 1 2 - 4 5 - > print(matrix(c(1,2,NA,4,5,NA),2), na.print="-") [,1] [,2] [,3] [1,]

Re: [R] data merging

2016-02-17 Thread Shane Carey
Hi, I found the error. Thanks in advance On Wed, Feb 17, 2016 at 4:01 PM, Shane Carey wrote: > Hi, > > Im trying to append rows to a data frame using smartbind > > I have 3 dataframes: > > > dim(DATA_WH)[1] 235 24> dim(DATA_GW)[1] 3037 41> dim(DATA_NFGWS)[1] 2485 > >

[R] data merging

2016-02-17 Thread Shane Carey
Hi, Im trying to append rows to a data frame using smartbind I have 3 dataframes: > dim(DATA_WH)[1] 235 24> dim(DATA_GW)[1] 3037 41> dim(DATA_NFGWS)[1] 2485 > 62 B<-smartbind(DATA_NFGWS,DATA_WH) However I get the following error: Error in `[.data.frame`(block, , col) : undefined

Re: [R-es] problema en el manejo con fechas

2016-02-17 Thread Luisfo
Buenas, El a�o en formato 4 cifras, tiene que ir con may�scula: lluv[,1] <- as.Date(lluv[,1], format="%m/%d/%Y") Prueba a ver si te funciona ahora. Un saludo, Luisfo On 02/17/2016 03:27 PM, eric wrote: > buenas tardes comunidad, tengo un problema al transformar fechas que > estaban

[R] R 3.2.4 and 3.3.0

2016-02-17 Thread Peter Dalgaard
R 3.2.4 "Very Secure Dishes", the wrap-up release of R-3.2.x is now scheduled for March 10 R 3.3.0 "Supposedly Educational", is scheduled for April 14. Detailed schedules are published on developer.r-project.org. For the Core Team Peter D. -- Peter Dalgaard, Professor, Center for

Re: [R] How to read DiCOM images using R?

2016-02-17 Thread Sarah Goslee
Searching for DICOM at www.rseek.org turns up a few options for working with that image format. But with no idea of what you want to do with them, we can't help with the analysis. You will need to develop some clear objectives, do some reading in how you might use R to accomplish those

Re: [R] missing values in csv file

2016-02-17 Thread S Ellison
> Is it possible to get object where missing values aren't replaced with NAs? Not with read.table, if they are really missing. But you can replace them later - see below - and if they are marked you can change what read.table considers to be 'missing'. > Is it possible to replace NAs with empty

Re: [R] this is not a list, not a data frame, but what ?

2016-02-17 Thread PIKAL Petr
Hi Seems to me that it is time for you to go through R intro. I do not remember myself using such weird construction. mom["PC_Q_m3",]$value You are lucky that you do not have duplicated values in your second column as in this case you would get error Error in

Re: [R] R Memory Issue

2016-02-17 Thread Sandeep Rana
Hi, May be its reading your file and taking time which depends on size of the file that you are reading. Please explore ‘data.table’ library to read big files in few seconds. If you attempt to close the application while execution had been in progress for sometime it would take time most of the

Re: [R] missing values in csv file

2016-02-17 Thread Michael Dewey
Assuming it is a character variable test <- c("a", NA, "b") > test [1] "a" NA "b" > test[is.na(test)] <- " " > test [1] "a" " " "b" but if it is numeric this as, as others have said, almost certainly not what you really wanted to do On 17/02/2016 10:04, Jan Kacaba wrote: In my original

Re: [R] R Memory Issue

2016-02-17 Thread PIKAL Petr
Hi I have this enhanced ls function, which evaluates size of objects generated by myself or by other functions sitting in my environment. ls.objects <- function (pos = 1, pattern, order.by) { napply <- function(names, fn) sapply(names, function(x) fn(get(x, pos = pos))) names <-

Re: [R] missing values in csv file

2016-02-17 Thread PIKAL Petr
Beside of Adrian's answer, R can simply manage NAs but you need to deal with "empty space" on your own. See ?is.na ?na.omit Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Adrian > Du?a > Sent: Wednesday, February 17, 2016 2:01 PM >

Re: [R] Static to interactive map (leaflet spplot)

2016-02-17 Thread Adams, Jean
Deb, I assume you have already seen the great introduction to leaflet here ... http://rstudio.github.io/leaflet/ You may find these two answers on stackoverflow helpful ... http://stackoverflow.com/a/28240058/2140956 http://stackoverflow.com/a/29118680/2140956 Jean On Tue, Feb 2, 2016 at

Re: [R] missing values in csv file

2016-02-17 Thread Adrian Dușa
On Wed, Feb 17, 2016 at 12:04 PM, Jan Kacaba wrote: > In my original data a csv file I have missing values. If I use read.table > the missing values are replaced by NAs. > That is the normal way of dealing with missing values, in R. Is it possible to get object where

Re: [R] this is not a list, not a data frame, but what ?

2016-02-17 Thread MAURICE Jean - externe
I went further ! I could give a name to each row based on column 2 in the read.table command and then access to the value by : mom["PC_Q_m3",]$value It’s great Jean Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à l'intention exclusive des destinataires et les

[R] R Memory Issue

2016-02-17 Thread SHIVI BHATIA
Dear Team, Every now and then I face some weird issues with R. For instance it would not read my csv file or any other read.table command and once I would close the session and reopen again it works fine. It have tried using rm(list=ls()) & gc() to free some memory and restart R

[R] missing values in csv file

2016-02-17 Thread Jan Kacaba
In my original data a csv file I have missing values. If I use read.table the missing values are replaced by NAs. Is it possible to get object where missing values aren't replaced with NAs? Is it possible to replace NAs with empty space? [[alternative HTML version deleted]]

Re: [R] this is not a list, not a data frame, but what ?

2016-02-17 Thread MAURICE Jean - externe
I need some more help ! Data.frame is working great but for one thing : once the file has been read, I can’t modify a ‘string’ column. This is, I suppose, because the column is a factor. But I get an error when I write : > mim = read.table(file = "GESDYN_COMPLET_parametres.txt", row.names =

Re: [R] Excluding "small data" from plot.

2016-02-17 Thread PIKAL Petr
Hi There is probably better solution but I would aggregate lll <- aggregate(ltrfreq$letterfreq, list(ltrfreq$letter, ltrfreq$type), sum) order ooo<-order(lll$x, decreasing=T) split and sapply lll<- lll[ooo,] lll <- lapply(split(lll, lll$Group.2), head, 8) and do.call rbind to get 8 letters

Re: [R] this is not a list, not a data frame, but what ?

2016-02-17 Thread Ulrik Stervbo
Hi Jean, the 'unused argument (stringAsFactors = FALSE)' gives you a good clue. It tells you, that you are passing an unexpected argument to the read.table function. In this case the argument is stringsAsFactors (string in plural). I don't know how you modify the columns, but the factors should

Re: [R] I Need Help for Location Model, etc

2016-02-17 Thread PIKAL Petr
Hi You can use either search within CRAN or Task Views. Both can suggest appropriate packages. Do not expect that we can decide which function/package you shall use for your data. I found among others: https://cran.r-project.org/web/packages/mix/mix.pdf but there are plenty of packages which

[R-es] Presentación y OFERTAS de Empleo

2016-02-17 Thread VICTORIA LOPEZ
Hola a todos, Soy Victoria López y os escribo como vocal de la comunidad R-Hispano en relaciones con empresas y empleo. Me gustaría que todo interesado me enviara su cv a mi dirección de email: vlo...@fdi.ucm.es o al correo: emp...@r-es.org De momento, ha sido publicada hoy en el BOAM la

Re: [R] Updating github R packages

2016-02-17 Thread Hadley Wickham
It will be included in the next version of devtools - it's totally do-able, but no one has done it yet. Hadley On Wed, Feb 17, 2016 at 6:44 PM, Jeff Newmiller wrote: > AFAIK the answer is no. That would be one of the main drawbacks of depending > on github for

[R] Excluding "small data" from plot.

2016-02-17 Thread Kieran
To R-help users: I want to use ggplot two plot summary statistics on the frequency of letters from a page of text. My data frame has four columns: (1) The line number [1 to 30] (2) The letter [a to z] (3) The frequency of the letter [assuming there is 80 letters per line] (4) The factor 'type':

Re: [R] I Need Help for Location Model,

2016-02-17 Thread Bert Gunter
Pls always respond to the list, which I have cc'ed. It sounds like you want us to teach you R and statistics. You need to do this yourself, using local resources or available tutorials and courses on the web. Some recommendations for this can be found here:

Re: [R] I Need Help for Location Model,

2016-02-17 Thread Bert Gunter
Pls do not repeat posts. That's spam. This list has a no homework policy. Your query seems to be homework. Ergo, you should not expect a response unless you clarify that it is not. Bert On Tuesday, February 16, 2016, Moss Moss wrote: > I am working on "Discrimination

[R] "predict" values from object of type "list"

2016-02-17 Thread Steve Ryan
Hi Guys, I could need some help here. I have a set of 3d points (x,y,v). These points are not randomly scattered but lie on a surface. This surface can be taken as a calibration plane for x and y -values. My goal is to quantify this surface and than predict the v-values for given pairs of x- and

[R] I Need Help for Location Model, etc

2016-02-17 Thread Moss Moss
I am working on "Discrimination and Classification Using Both Binary and Continuous Variables". Please, how can I use R-programming in running the following: (1) Location Model (2) Misclassification (3) Error Rate (4) Etc I have R i386 3.2.2 installed to in my system. How do I trace statistical

Re: [R] this is not a list, not a data frame, but what ?

2016-02-17 Thread MAURICE Jean - externe
Hi Ulrik and Rui, Both solutions work but data.frame is the way i’ll go because there is an advantage that I was’nt aware at the beginning : we can save the data.frame in a text file, modify this file with notepad, … Thank you very much Jean Ce message et toutes les pièces jointes (ci-après

[R] How to read DiCOM images using R?

2016-02-17 Thread vidu pranam
Hai, I have some DICOM format images for my project. Can you please help me how can I read it by using R and how to analyse the images? Regards Vidu [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE

[R] Constructing a symmetric matrix using library(corpcor)

2016-02-17 Thread Steven Yen
Hello I am constructing a symmetric matrix with library "corpcor". In the codes below, I am able to construct a symmetric matrix of order 3 and 4. However, the 5 x 5 matrix does not seem right? Help? Thanks. > library(corpcor)> r <- 1:3> rr <- vec2sm(r, diag = F)> rr <- > rr[upper.tri(rr)]>

[R] I Need Help for Location Model

2016-02-17 Thread Moss Moss
I am working on "Discrimination and Classification Using Both Binary and Continuous Variables". Please, how can I use R-programming in running the following: (1) Location Model (2) Misclassification (3) Error Rate (4) Etc I have R i386 3.2.2 installed to in my system. How do I trace statistical