Re: [R] "inahull” from package alphahull not working when used with apply

2014-10-26 Thread Bart Kastermans
On 27/10/14 06:05, Camilo Mora wrote: > Hi everyone, > > I have a two column (x,y) database with say 20 million rows. I want to check > the points that are inside of a hull created with the package alphahull. The > function that does this is call �inahull�, and it runs well when I use it for >

[R] "inahull” from package alphahull not working when used with apply

2014-10-26 Thread Camilo Mora
Hi everyone, I have a two column (x,y) database with say 20 million rows. I want to check the points that are inside of a hull created with the package alphahull. The function that does this is call �inahull�, and it runs well when I use it for one point at a time. But when I try to optimize th

Re: [R] Plot size

2014-10-26 Thread David Doyle
Thank You!! On Sun, Oct 26, 2014 at 10:01 PM, Dennis Murphy wrote: > I'd suggest using the knitr code chunk options in Rmarkdown to control > the plot size in the document; e.g., > > ```{r myplot, fig.height=5, fig.width=6} > > ``` > If you use RStudio, it will provide code completion for you a

Re: [R] Box Plot size and labels

2014-10-26 Thread Jeff Newmiller
Your code uses the default graphics output device (most likely the windows() device, guessing from your use of MSWord). The png() device might produce more consistent results. Since you are using RMarkdown, you may be using knitr which has chunk options that can be used to control the device use

[R] Box Plot size and labels

2014-10-26 Thread David Doyle
Hello, I'm doing some box plots in Rmarkdown to MS Word file. When they come into the word file they are not quite wide enough for labels for the different boxes. Is there a way for me to set the size the box plot would be so I can make it wider? Or reduce the font size so they can all fit on t

[R] CRAN (and crantastic) updates this week

2014-10-26 Thread Crantastic
CRAN (and crantastic) updates this week New packages * BayesMixSurv (0.9) Maintainer: Alireza S. Mahani Author(s): Alireza S. Mahani, Mansour T.A. Sharabiani License: GPL (>= 2) http://crantastic.org/packages/BayesMixSurv Bayesian Mixture Survival Models using Additive Mix

Re: [R] Help

2014-10-26 Thread Jeff Newmiller
Have you investigated your data using the str function? str(data) Also, read the Posting Guide and learn how to use your email software to post using plain text so we will see what you see. --- Jeff Newmiller

Re: [R] Help with Lowess smoother

2014-10-26 Thread peter dalgaard
> On 26 Oct 2014, at 21:51 , Don McKenzie wrote: > >> >> On Oct 26, 2014, at 1:45 PM, Evan Kransdorf wrote: >> >> Hello, >> >> I'm trying to use Lowess smooters to plot some data for regression >> analyses. When I do with certain variables, I get the following error: >> >>> plot(lowess(dat

[R] Help

2014-10-26 Thread Evan Kransdorf
Hello, I'm trying to use Lowess smooters to plot some data for regression analyses. When I do with certain variables, I get the following error: > plot(lowess(data$V1,data$V2)) Error in lowess(data$V1, data$V2) : 'delta' must be finite and > 0 Does anyone know where the problem is? I suspect t

Re: [R] Help with Lowess smoother

2014-10-26 Thread Don McKenzie
> On Oct 26, 2014, at 1:45 PM, Evan Kransdorf wrote: > > Hello, > > I'm trying to use Lowess smooters to plot some data for regression > analyses. When I do with certain variables, I get the following error: > >> plot(lowess(data$V1,data$V2)) > Error in lowess(data$V1, data$V2) : 'delta' must

[R] Help with Lowess smoother

2014-10-26 Thread Evan Kransdorf
Hello, I'm trying to use Lowess smooters to plot some data for regression analyses. When I do with certain variables, I get the following error: > plot(lowess(data$V1,data$V2)) Error in lowess(data$V1, data$V2) : 'delta' must be finite and > 0 Does anyone know where the problem is? I suspect t

Re: [R] Selecting rows/columns of a matrix

2014-10-26 Thread David L Carlson
Note that you do not have to create the vector of 1's (TRUE) and 0's (FALSE) if you know the index values: > j <- c(2, 4, 6) > a[j, j] [,1] [,2] [,3] [1,]8 20 32 [2,] 10 22 34 [3,] 12 24 36 == David L. Carlson Department of Anthropology Texas

Re: [R] Selecting rows/columns of a matrix

2014-10-26 Thread William Dunlap
Use logical vectors and the "[" operator: x[condition] can be read as 'x such that condition [is true]'. E.g., > a<-matrix(1:16, 4,4,byrow=T) > j <- c(TRUE, FALSE, TRUE, FALSE) > a[j,,drop=FALSE] [,1] [,2] [,3] [,4] [1,]1234 [2,]9 10 11 12 > a[,

Re: [R] Selecting rows/columns of a matrix

2014-10-26 Thread Steven Yen
Rui Thanks. This works great. Below, I get the 2nd, 4th, and 6th rows/columns: > (a<-matrix(1:36,6,6)) [,1] [,2] [,3] [,4] [,5] [,6] [1,]17 13 19 25 31 [2,]28 14 20 26 32 [3,]39 15 21 27 33 [4,]4 10 16 22 28 34 [5,]5 11 1

Re: [R] Selecting rows/columns of a matrix

2014-10-26 Thread Rui Barradas
Sorry, that should be t(a[as.logical(j), as.logical(j)]) Rui Barradas Em 26-10-2014 18:45, Rui Barradas escreveu: Hello, Try the following. a[as.logical(j), as.logical(j)] # or b <- a[as.logical(j), ] t(b)[as.logical(j), ] Hope this helps, Rui Barradas Em 26-10-2014 18:35, Steven Yen es

Re: [R] Selecting rows/columns of a matrix

2014-10-26 Thread Rui Barradas
Hello, Try the following. a[as.logical(j), as.logical(j)] # or b <- a[as.logical(j), ] t(b)[as.logical(j), ] Hope this helps, Rui Barradas Em 26-10-2014 18:35, Steven Yen escreveu: Dear I am interested in selecting rows and columns of a matrix with a criterion defined by a binary indicato

[R] Selecting rows/columns of a matrix

2014-10-26 Thread Steven Yen
Dear I am interested in selecting rows and columns of a matrix with a criterion defined by a binary indicator vector. Let matrix a be > a<-matrix(1:16, 4,4,byrow=T) > a [,1] [,2] [,3] [,4] [1,]1234 [2,]5678 [3,]9 10 11 12 [4,] 13 14 15 16

Re: [R] kruskal test p value way too low.

2014-10-26 Thread David Doyle
Thank for your help!! That took care of the problem! Thank you again David "Kentucky Geologist trying to learn R" Doyle On Sun, Oct 26, 2014 at 12:37 AM, Rolf Turner wrote: > On 26/10/14 16:40, David Doyle wrote: > >> Hello, >> >> I'm trying to run kruskal test on some data but the p values

Re: [R] About the availability of a new package

2014-10-26 Thread Duncan Murdoch
On 25/10/2014, 1:25 PM, Jingsi Zhang wrote: > Hi > > How does one know the availability of CRAN packages by the name of > publications? I know there is a long list of available packages by date of > publications, but it's so inconvenient to find the one I need. It happened > at least twice when I

Re: [R] Looking for Feature Hashing

2014-10-26 Thread Duncan Murdoch
On 25/10/2014, 5:25 AM, Wush Wu wrote: > Dear all, > > Sorry that I am not sure that whether I should ask the question here or > R-devel. Is there any existed packages which implements or is implementing > feature hashing or similar function? > > For who does not know "feature hashing", please le

[R] Matrix::sparse.model.matrix produces inconsistent result

2014-10-26 Thread Wush Wu
Hi, I notice that the Matrix::sparse.model.matrix produces inconsistent matrix when the contrasts is a sparse matrix. Here is a minimal example: ```r library(Matrix) class(CO2[[1]]) <- class(CO2[[2]]) <- "factor" get_contr <- function(is_sparse) { contr <- list() contr[["Plant"]] <- contrast

Re: [R] RCurl memory leak in getURL method

2014-10-26 Thread Ramnnek Singh
Thanks Martin. Duncan has replied on http://stackoverflow.com/questions/26556629/rcurl-memory-leak-in-geturl-method I will test it in the application I have and update the thread here as well. -Original Message- From: "Martin Maechler" Sent: ‎25/‎10/‎2014 8:40 PM To: "dotnet sql" Cc

[R] About the availability of a new package

2014-10-26 Thread Jingsi Zhang
Hi How does one know the availability of CRAN packages by the name of publications? I know there is a long list of available packages by date of publications, but it's so inconvenient to find the one I need. It happened at least twice when I failed to repeat other's simulation results, and sent au

[R] Looking for Feature Hashing

2014-10-26 Thread Wush Wu
Dear all, Sorry that I am not sure that whether I should ask the question here or R-devel. Is there any existed packages which implements or is implementing feature hashing or similar function? For who does not know "feature hashing", please let me give a brief explanation here. Feature hashing