[R] Draw a dendrogram with ROCK clustering (cba package)

2015-12-14 Thread Ahreum Lee
Dear all. Hi, Currently, i do clustering analysis with several algorithms in R. one of them is ROCK clustering. Thanks to "cba" package in R, i could easily analyze with ROCK. (https://cran.r-project.org/web/packages/cba/cba.pdf) but what I want to see is a dendrogram which could be in

[R] Hexbin: Counting Bins That Meet Certain Criteria

2015-12-14 Thread Sidoti, Salvatore A.
Greetings! Is there a way to count the bins in a hexbin plot that meet certain criteria? For instance, what if I wanted to count the bins (hexes) that have a datapoint density of some number x? Thank you! __ R-help@r-project.org mailing list -- To UN

Re: [R] Make a box-whiskers plot in R with 5 variables, color coded.

2015-12-14 Thread peter dalgaard
> On 14 Dec 2015, at 22:54 , David Winsemius wrote: > >> >> On Dec 14, 2015, at 1:34 PM, Dmitri Leybman wrote: >> >> I have a spreadsheet with five different columns standing for five >> different variables: >> >> Variable 1 Variable 2 Variable 3 Variable 4 Variable 5 0 0 7 1 0 0 0 7 0 0 1 >

Re: [R] Make a box-whiskers plot in R with 5 variables, color coded.

2015-12-14 Thread David Winsemius
> On Dec 14, 2015, at 1:34 PM, Dmitri Leybman wrote: > > I have a spreadsheet with five different columns standing for five > different variables: > > Variable 1 Variable 2 Variable 3 Variable 4 Variable 5 0 0 7 1 0 0 0 7 0 0 1 > 1 8 2 0 5 5 8 0 0 1 4 8 1 0 4 5 8 0 0 0 1 7 2 1 > I am trying to

[R] Make a box-whiskers plot in R with 5 variables, color coded.

2015-12-14 Thread Dmitri Leybman
I have a spreadsheet with five different columns standing for five different variables: Variable 1 Variable 2 Variable 3 Variable 4 Variable 5 0 0 7 1 0 0 0 7 0 0 1 1 8 2 0 5 5 8 0 0 1 4 8 1 0 4 5 8 0 0 0 1 7 2 1 I am trying to create five box and whiskers plots on a single graph with a five x-lab

Re: [R] Random selection of a fixed number of values by interval

2015-12-14 Thread David Winsemius
> On Dec 14, 2015, at 12:46 PM, David L Carlson wrote: > > There are lots of ways to do this. For example, Another method with mapply: mapply(function( n, vals) {sample(vals$id, n)} , # no replacement is the default for sample vals= split(data, findInterval(data$value, 0:5) )[1

Re: [R] Random selection of a fixed number of values by interval

2015-12-14 Thread Bert Gunter
Yes. May I suggest: grp <- c("[0,1)", "[1,2)", "[2,3)", "[3,4)", "[4,5)") can be obtained more simply as grp <- levels(groups)[1:5] and one slight aesthetic change in the indexing: from: samples <- lapply(1:5, function(x) sample(data$id[groups==grp[x]], size[x])) to: samples <- lapply(1:5, f

[R] paneling spplot and hist

2015-12-14 Thread Debasish Pai Mazumder
Hi all, I am new in R. I am trying to panel spplot and hist. spplot(hspdf, "CDP", col = "white", col.regions = blue2red(20), sp.layout = list(l2), at = seq(1,10,1), colorkey = list(space = "bottom", labels = list(labels = paste(seq(1,10,1)), cex = 1.5)), sub = list("CDP", cex = 1.5, font = 2)) h

Re: [R] choropleth packages (US)

2015-12-14 Thread Adrian Waddell
Alaska and Hawaii can be found in the 'world' or 'world2' databases of the 'maps' package. The following is a bit a hack but it works library(maps) library(scales) mergeMaps <- function(...) { maps <- list(...) if (length(maps) < 2) stop("need at least two maps") map <- maps[[1]]

Re: [R] repeated measure with quantitative independent variable

2015-12-14 Thread Cristiano Alessandro
Dear John, thanks for your reply! The reason why I did not want to factorize the within-subjects variable was to avoid increasing the Df of the model from 1 (continuous variable) to k-1 (where k is the number of levels of the factors). I am now confused, because you have factorized the variab

Re: [R] Random selection of a fixed number of values by interval

2015-12-14 Thread David L Carlson
There are lots of ways to do this. For example, > groups <- cut(data$value, include.lowest = T, right = FALSE, + breaks = 0:ceiling(max(data$value))) > grp <- c("[0,1)", "[1,2)", "[2,3)", "[3,4)", "[4,5)") > size <- c(10, 7, 5, 5, 3) > set.seed(42) > samples <- lapply(1:5, function(x) sample(

[R] Random selection of a fixed number of values by interval

2015-12-14 Thread Frank S.
Dear R users, I'm writing to this list because I must get a random sample (without replacement) from a given vector, but the clue is that I need to extract a fixed number of values by each prespecified 1-unit interval. As an example I try to say, I have a data frame that looks like this (my re

Re: [R] Print minified XML in tree format

2015-12-14 Thread Giorgio Garziano
I may suggest this quick guide: http://gastonsanchez.com/work/webdata/getting_web_data_r4_parsing_xml_html.pdf and the following link: http://www.r-datacollection.com/ I apologize for not being more specific. -- GG [[alternative HTML version deleted]]

Re: [R] repeated measure with quantitative independent variable

2015-12-14 Thread Fox, John
Dear Cristiano, > -Original Message- > From: Cristiano Alessandro [mailto:cri.alessan...@gmail.com] > Sent: Monday, December 14, 2015 2:11 PM > To: Fox, John > Cc: r-help@r-project.org > Subject: Re: [R] repeated measure with quantitative independent variable > > Dear John, > > thanks fo

[R] Print minified XML in tree format

2015-12-14 Thread Archit Soni
Hi All, I am new to wonderful world of R, I am stuck at one problem. I need to print the minified XML string in tree format, i have tried below code: ex <- "ToveJaniReminderDon't forget me this weekend!"> > XML::xmlParse(ex) Tove Jani Reminder Don't forget me this weekend! ​and it is

Re: [R] stopifnot with logical(0)

2015-12-14 Thread Duncan Murdoch
On 14/12/2015 11:45 AM, Hadley Wickham wrote: >> I wonder if R is missing an equality operator for this case. Currently: >> >> * == is suboptimal because it's vectorised >> * all.equal is suboptimal because it returns TRUE or a text string >> * identical is suboptimal because it doesn't do common

Re: [R] Extract survival probabilities from an Extended Cox model

2015-12-14 Thread David Winsemius
> On Dec 14, 2015, at 2:01 AM, Justine Nasejje wrote: > > Dear All, > How can I extract survival probabilities from a fitted extended > Cox model in R? Thank you in advance. Perhaps you should define the term "extended" in the context of Cox models? Ideally you would offer one of a)

Re: [R] stopifnot with logical(0)

2015-12-14 Thread Hadley Wickham
>> I wonder if R is missing an equality operator for this case. Currently: >> >> * == is suboptimal because it's vectorised >> * all.equal is suboptimal because it returns TRUE or a text string >> * identical is suboptimal because it doesn't do common coercions >> >> Do we need another function (eq

Re: [R] stopifnot with logical(0)

2015-12-14 Thread William Dunlap
Hadley wrote > * all.equal is suboptimal because it returns TRUE or a text string That feature works ok with stopifnot(): > stopifnot(all.equal("one", 1)) Error: all.equal("one", 1) are not all TRUE and I suppose stopifnot could be enhanced to print the text strings that all.equal() returns so

Re: [R] stopifnot with logical(0)

2015-12-14 Thread Duncan Murdoch
On 14/12/2015 11:10 AM, Hadley Wickham wrote: On Sat, Dec 12, 2015 at 1:51 PM, Martin Maechler wrote: >> Hadley Wickham >> on Sat, 12 Dec 2015 08:08:54 -0600 writes: > > > On Sat, Dec 12, 2015 at 3:54 AM, Martin Maechler > > wrote: > >>> Henrik Bengtsson on > >

Re: [R] repeated measure with quantitative independent variable

2015-12-14 Thread Fox, John
Dear Cristiano, If I understand correctly what you want to do, you should be able to use Anova() in the car package (your second question) by treating your numeric repeated-measures predictor as a factor and defining a single linear contrast for it. Continuing with your toy example: > myfacto

Re: [R] Problems using estimable() (gmodels) on lme()-objects

2015-12-14 Thread Bert Gunter
If you do not receive a satisfactory reply here, this is the sort of question that you should email the maintainer for, found by: > maintainer("gmodels") [1] "Gregory R. Warnes " Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things i

Re: [R] stopifnot with logical(0)

2015-12-14 Thread Hadley Wickham
On Sat, Dec 12, 2015 at 1:51 PM, Martin Maechler wrote: >> Hadley Wickham >> on Sat, 12 Dec 2015 08:08:54 -0600 writes: > > > On Sat, Dec 12, 2015 at 3:54 AM, Martin Maechler > > wrote: > >>> Henrik Bengtsson on > >>> Fri, 11 Dec 2015 08:20:55 -0800 writes: >

[R] repeated measure with quantitative independent variable

2015-12-14 Thread Cristiano Alessandro
Hi all, I am new to R, and I am trying to set up a repeated measure analysis with a quantitative (as opposed to factorized/categorical) within-subjects variable. For a variety of reasons I am not using linear-mixed models, rather I am trying to fit a General Linear Model (I am aware of assump

[R] Problems using estimable() (gmodels) on lme()-objects

2015-12-14 Thread CG Pettersson
R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree", W7-32 Dear all, I just upgraded R and downloaded a new version of “gmodels”, to use estimable() for extracting fixed effects from lme()-objects. Now it seems like estimable() have changed its view of dimensions of my lme-objects and cont

[R] [R-pkgs] New Package "radiomics": First and Second Order Matrix Statistics

2015-12-14 Thread joel carlson
Dear R Users, I am pleased to inform you that my package, 'radiomics' is now available on CRAN: https://cran.r-project.org/web/packages/radiomics/ The radiomics package offers 4 classes of texture matrices, and associated feature sets. These matric

[R] R-Help

2015-12-14 Thread Bello A rasheed via R-help
Dear R users  Kindly help me on how run this code because there is error when ever i run it. It give me an error at Error: lent >= 1 is not TRUE  Error: object 'hubPsi' not found Error in cbind(b = b, A = A, B = B, V = A/B^2, e = B^2/A, gamma. = b/B,  :   dims [product 3] do not match the length

[R] Extract survival probabilities from an Extended Cox model

2015-12-14 Thread Justine Nasejje
Dear All, How can I extract survival probabilities from a fitted extended Cox model in R? Thank you in advance. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.eth

[R] Problems when using estimable() (gmodels) on lme()-objects

2015-12-14 Thread CG Pettersson
R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree", W7-32 Dear all, I just upgraded R and downloaded a new version of "gmodels", to use estimable() for extracting fixed effects from lme()-objects. Now it seems like estimable() have changed its view of dimensions of my lme-objects and contra

[R] [R-pkgs] randomForestSRC 2.0.0

2015-12-14 Thread Udaya B. Kogalur
randomForestSRC 2.0.0 is now available on CRAN. The package is able to handle multivariate regression (data sets in which the response is one or more continuous variables), multivariate classification (data sets in which the response is one or more factor variables), multivariate mixed (data sets

Re: [R] matrix which results singular but at the same time positive definite

2015-12-14 Thread Stefano Sofia
Dear John and dear Peter, I needed time to understand better some practical implications derived from your hints. Thank you Stefano Da: Fox, John [j...@mcmaster.ca] Inviato: giovedì 10 dicembre 2015 17.24 A: peter dalgaard; Stefano Sofia Cc: r-help@r-proj

Re: [R] stopifnot with logical(0)

2015-12-14 Thread Martin Maechler
> "DM" == Duncan Murdoch > on Sat, 12 Dec 2015 09:05:04 -0500 writes: DM> On 12/12/2015 8:44 AM, peter dalgaard wrote: >> >>> On 12 Dec 2015, at 10:54 , Martin Maechler >>> wrote: >>> >>> My conclusion: Breaking such a fundamental lemma of >>> logic as "

[R] R: forest plot metafor

2015-12-14 Thread Mario Petretta
Many tanks to Wolfgang Viechtbauer for his time and help. The suggested code works very well Mario Petretta. __ Message: 11 Date: Sat, 12 Dec 2015 17:22:20 +0100 From: "Viechtbauer Wolfgang (STAT)" To: "r-he