Re: [R] One Dimensional Monte Carlo Simulation

2017-08-01 Thread Law, Jason
Tony,

I’m not sure what exactly you’re trying to do, but you're not really taking 
advantage of vectorization in your R code. I've tried to clean it up a little. 
The clamped lognormal is almost always 0 or L? That seems a little odd. You 
seem to be using the inverse cdf method of drawing samples. That's not 
necessary in R for standard probability distributions. You may want to do a 
little more investigating of basic programming tasks in R before you dig into a 
complex simulation.

scale   <- 15.08707 
shape   <-  0.8592507 
lambda.risk <-  1.75 
L   <-  7.5e5 
R   <-  2.5e6

# Generate n random poisson with rate = lambda.risk
frequency <- function(n) rpois(n,lambda.risk)

# clamp a numeric to 0, L
clamp <- function(x, min, max) pmin(max, pmax(min, x))

# Generate lognormal shifted by R
severity <- function(n) rlnorm(n,scale,shape)-R

clamp(severity(100), 0, L) # Lognormal shifted left by R, and then clamped 
between 0 and L? Almost always equal to 0 or L

sim <- function(breaks = 7){
  freq   <- frequency(1)
  i  <- freq > 1:7
  sev<- clamp(severity(sum(i)), 0, L)
  claims <- rep(0, 7)
  claims[i] <- sev
  min(22.5e6,sum(claims)) 
}

hist(iterations <- replicate(1, sim()), breaks = 20)



From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of HUL-Anthony 
Egerton
Sent: Friday, July 14, 2017 7:45 PM
To: r-help@r-project.org
Subject: Re: [R] One Dimensional Monte Carlo Simulation

Further to my email below, I have just realised that I forgot to include the 
specification of L and R.

Hence, the code needs to include the following additional lines at the start;-

L<-7.5e6
R<-2.5e6

Apologies for any confusion caused!

Best regards,

Tony


> On 12 Jul 2017, at 10:03 AM, HUL-Anthony Egerton 
>  wrote:
> 
> I am trying to code a basic Monte Carlo Simulation in R where a Poisson 
> distribution generates a frequency output that is then input into a Lognormal 
> distribution, which produces a different, independent severity for each 
> incidence. The individual incidences are then summed to produce an aggregate 
> amount per period/iteration. 
> 
> Here is the code;-
> 
> scale<-15.08707 
> shape<-0.8592507 
> lambda.risk<-1.75 
> L<-7.5e5 
> R<-2.5e6 
> iterations<-replicate(1,{ 
>  claims1<-0 
>  claims2<-0 
>  claims3<-0 
>  claims4<-0 
>  claims5<-0 
> claims6<-0 
>  claims7<-0 
>  claims<-c(claims1,claims2,claims3,claims4,claims5,claims6,claims7)
>  freq<-(qpois(runif(1),lambda.risk)) 
>  sev<-pmin(L,pmax(0,(qlnorm(runif(1),scale,shape)-R))) 
>  if(freq>=1){claims1<-sev} 
>  sev<-pmin(L,pmax(0,(qlnorm(runif(1),scale,shape)-R))) 
>  if(freq>=2){claims2<-sev} 
>  sev<-pmin(L,pmax(0,(qlnorm(runif(1),scale,shape)-R))) 
>  if (freq>=3) {claims3<-sev} 
>  sev<-pmin(L,pmax(0,(qlnorm(runif(1),scale,shape)-R))) 
>  if (freq>=4) {claims4<-sev} 
>  sev<-pmin(L,pmax(0,(qlnorm(runif(1),scale,shape)-R))) 
>  if (freq>=5) {claims5<-sev} 
>  sev<-pmin(L,pmax(0,(qlnorm(runif(1),scale,shape)-R))) 
>  if (freq>=6) {claims6<-sev} 
>  sev<-pmin(L,pmax(0,(qlnorm(runif(1),scale,shape)-R))) 
>  if (freq>=7) {claims7<-sev} 
>  claims<-c(claims1,claims2,claims3,claims4,claims5,claims6,claims7) 
>  min(22.5e6,sum(claims)) 
> })
> 
> I am new to R, but am sure that there must be a simpler way to code this 
> process. 
> 
> Furthermore, as the Poisson lambda increases, there is a need to include 
> provision for potentially more incidences, which will require a manual 
> expansion of the code to claims8, claims9 etc.
> 
> Can you assist, please?
> 
> Best regards,
> 
> Anthony A H Egerton MA MBA ACII
> �
> HUNTINGTON UNDERWRITING LIMITED
> Labuan FT, Malaysia
> 
> 
> 
> CONFIDENTIALITY NOTE: 
>  
> The information contained in this email message may be legally privileged and 
> contain confidential information and is intended only for the use of the 
> individual or entity to whom it is addressed. If the reader of this message 
> is not the intended recipient, you are hereby notified that any 
> dissemination, distribution or copy of this message is strictly prohibited. 
> If you have received this email in error, please immediately delete this 
> message.
> 
> Begin forwarded message:
> 
>> From: mailto:r-help-requ...@r-project.org
>> Date: 8 July 2017 at 6:00:02 PM SGT
>> To: mailto:r-help@r-project.org
>> Subject: R-help Digest, Vol 173, Issue 8
>> Reply-To: mailto:r-help@r-project.org
>> 
>> Send R-help mailing list submissions to
>>    mailto:r-help@r-project.org
>> 
>> To subscribe or unsubscribe via the World Wide Web, visit
>>    https://stat.ethz.ch/mailman/listinfo/r-help
>> or, via email, send a message with subject or body 'help' to
>>    mailto:r-help-requ...@r-project.org
>> 
>> You can reach the person managing the list at
>>    mailto:r-help-ow...@r-project.org
>> 
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of R-help digest..."
>> 
>> 
>> Today's Topics:
>> 
>>   1. R lo

[R] How to replace match words whith colum name of data frame?Hi--

2017-08-01 Thread Ek Esawi
Hi--

concept_df$NewCol <- "";
kw <- "acid|ph";
bb <- grepl(kw,concept_df$concept)
concept_df[dd,2] <- "chemical"

The is a bit late but it accomplish the same with base R.

Good luck--EK

PS.. my email doesn't accept reply

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours

2017-08-01 Thread PIKAL Petr
Hi

Keep your messages coppied to R helplist, others could give you answers too.

See in line

From: Rosa Oliveira [mailto:rosit...@gmail.com]
Sent: Tuesday, August 1, 2017 4:38 PM
To: PIKAL Petr 
Subject: Re: [R] Superscript and subscrib R for legend x-axis and y-axis and 
colour different subjects in longitudinal data with different colours

Hi Pikal,

I looked your message, but I think you do not answer the question, right?


Why do you think so. did you try it?

I basically suggested

plot(c(1:5), type = "n",
xlab=expression("t"[i]),
ylab=expression("y"^ij))
mtext(expression(lambda^2))

which by my humble opinion is precisely what you wanted.

I want to write t_i instead of "Day in ICU” [i subscript for t] and y_ij 
instead of "CRP (mg/dL)” [ij superscript for y].

If it is not you need to express yourself more clearly. My crystal ball is 
broken.

Cheers
Petr

On 31 Jul 2017, at 13:44, PIKAL Petr 
mailto:petr.pi...@precheza.cz>> wrote:

Hi


From: Rosa Oliveira [mailto:rosit...@gmail.com]
Sent: Monday, July 31, 2017 11:47 AM
To: Martin Maechler 
mailto:maech...@stat.math.ethz.ch>>
Cc: PIKAL Petr mailto:petr.pi...@precheza.cz>>; r-help 
mailing list mailto:r-help@r-project.org>>
Subject: Re: [R] Superscript and subscrib R for legend x-axis and y-axis and 
colour different subjects in longitudinal data with different colours

Hi, everyone,

Before everything, thanks. Lots of thanks ;)

I don’t think you understood everything I need to do.

Most probably because you did not tell precisely what you really want.

I want to write t_i instead of "Day in ICU” [i subscript for t] and y_ij 
instead of "CRP (mg/dL)” [ij superscript for y]. The label of the axis… :(

So something like that.
plot(c(1:5), CRP7raw[1,], type = "n", xlim=c(1,5),
ylim=c(-10,5) ,
xlab=expression("t"[i]),
ylab=expression("y"^ij))
mtext(expression(lambda^2))

Cheers
Petr

Can you help me on that task?

Thanks!

Best,
Rosa Oliveira


On 31 Jul 2017, at 10:28, Martin Maechler 
mailto:maech...@stat.math.ethz.ch>> wrote:

PIKAL Petr mailto:petr.pi...@precheza.cz>>
   on Mon, 31 Jul 2017 09:11:18 + writes:

Hi Martin see in line

-Original Message- From: Martin Maechler
[mailto:maech...@stat.math.ethz.ch] Sent: Monday, July
31, 2017 10:52 AM To: PIKAL Petr 
mailto:petr.pi...@precheza.cz>>
Cc: Rosa Oliveira mailto:rosit...@gmail.com>>; r-help 
mailing
list http://project.org/>>
Subject: Re: [R] Superscript and subscrib R for legend
x-axis and y-axis and colour different subjects in
longitudinal data with different colours


Hi Rosa > something like

plot(1,1, sub=expression(lambda^"2"))

So with your example, do you want something like

plot(c(1:5), CRP7raw[1,], type = "n", xlim=c(1,5),
ylim=c(-10,5) , > xlab="Day in ICU", > ylab="CRP
(mg/dL)", > sub = mtext(expression(lambda^2)))

OOps!  Either plot( ..., sub = *) or plot( ... ) ;
mtext(*)

but not both!

You are right, I used a code from OP and did not much
think about it. Strangely enough, the code worked without
any complain. Probably mtext is "stronger" than sub and
overrides it.

Well, well, "the magic of R"  .
Not quite:  mtext(..) is a valid function call that is evaluated
before plot() finishes; then it returns NULL invisibly, and
'plot(*, sub=NULL)' does nothing "coincidentally" (but for good
reasons)

Martin

Cheers Petr


CRP7graph <- apply(CRP7, 1, lines, col="gray")

Cheers > Petr


-Original Message- > > From: R-help
[mailto:r-help-boun...@r-project.org] On Behalf Of Rosa >
Oliveira > > Sent: Friday, July 28, 2017 5:07 PM > >
To: r-help mailing list mailto:r-help@r-project.org>>;
R-help@r-project.org > > Subject: [R] Superscript 
and
subscrib R for legend x-axis and y-axis > > and colour
different subjects in longitudinal data with different >
colours

I am trying to make a x-axis and y-axis titles with
both a special > > character and a subscript. I am not
being able to do this. I think > > its just a placing of
my parenthesis, but I've tried (seemingly) everything.

Even more, when I try the blog users code it works.



Is it because I’m using longitudinal data?



Even more. Is it possible to colour each one of the
15 lines with a > > different colour?






library(ggplot2) > > library(reshape) > >
library(lattice) > > library(gtable) > > library(grid)

attach(mtcars)

beta0 = rnorm (15, 1, .5) > > beta1 = rnorm (15, -1,
.5)

tempo = seq(1:5)

CRP7raw = matrix(NA, 15, 5) > > CRP7 = matrix(NA, 15,
5) > > CRP98raw = matrix(NA, 15, 5) > > CRP98 =
matrix(NA, 15, 5)

crp <- for (i in 1:15) { > > CRP7raw[i,] = beta0[i] +
beta1[i] * tempo > > CRP7[i,] = CRP7raw[i,] + rnorm(5, 0,
2.14)

CRP98raw[i,] = beta0[i] + beta1[i] * tempo > >
CRP98[i,] = CRP98raw[i,] + rnorm(5, 0, .1) > > }


# plot(c(1:5), CRP7raw[1,], type = "n", xlim=c(1,5),
ylim=c(-10,5) , > > # xlab="Day in ICU", > > # ylab="CRP
(mg/dL)", > > # sub = mtext(expression(paste(lambda)))
#
# CRP7graph <- apply(CRP7, 1, lines, col="gray")






# plot(c(1:5), CRP98raw

Re: [R] How automatic Y on install y/n prompts?

2017-08-01 Thread Jeff Newmiller
You should read the section on Indexing in the Introduction to R document that 
comes with R, regarding $ and `[[`.
-- 
Sent from my phone. Please excuse my brevity.

On August 1, 2017 2:44:18 AM PDT, Dimlak Gorkehgz  wrote:
>You are right, maintainer does keep a list of model's packages.
>
>So how do I use a variable instead of $adaboost$?
>
>getModelInfo()$adaboost$library
>
>
>
>Also, server not found:
>http://rwiki.sciviews.org/doku.php?id=getting-started:reference-cards:getting-help
>
>On Tue, Aug 1, 2017 at 11:46 AM, Bert Gunter 
>wrote:
>
>> I have provided you all the "advice" I can. Sorry it didn't help. You
>> should re-post your responses to me to r-help so that others might
>> help. you might also email the maintainer, found via the maintainer()
>> function, who may not monitor the list.
>>
>> Cheers,
>> Bert
>> Bert Gunter
>>
>> "The trouble with having an open mind is that people keep coming
>along
>> and sticking things into it."
>> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>>
>>
>> On Mon, Jul 31, 2017 at 9:38 PM, Dimlak Gorkehgz
>
>> wrote:
>> >  tools::package_dependencies(packs, available.packages(),
>> > + which=c("Imports",
>> "LinkingTo","Enhances"), #
>> > + recursive=T)
>> >
>> >
>> >
>> > (and suggests, and imports, and everything) does not include most
>> packages
>> > needed by every model. Recursive everything downloads most of all
>> packages
>> > available of CRAN. And then some necessary packages are not
>available and
>> > every pass through brings up a prompt for them.
>> >
>> >
>> >
>> >
>> > On Tue, Aug 1, 2017 at 11:12 AM, Dimlak Gorkehgz
>
>> > wrote:
>> >>
>> >> Excuse me if I did not explain myself correctly but I currently
>use:
>> >>
>> >> list.of.packages <- c("caretEnsemble","logicFS","
>> >> RWeka","ordinalNet","xgboost","mlr","caret","MLmetrics","
>> bartMachine","spikeslab","party","rqPen","monomvn","
>> foba","logicFS","rPython","qrnn","randomGLM","msaenet","
>> Rborist","relaxo","ordinalNet","rrf","frbs","extraTrees","
>> ipred","elasticnet","bst","brnn","Boruta","arm","elmNN","
>>
>evtree","extraTrees","deepnet","kknn","KRLS","RSNNS","partDSA","plsRglm","
>> quantregForest","ranger","inTrees")
>> >> new.packages <- list.of.packages[!(list.of.packages %in%
>> >> installed.packages()[,"Package"])]
>> >> if(length(new.packages)) install.packages(new.packages, dep =
>TRUE)
>> >>
>> >> #install.packages("mlr", dependencies = c("Depends", "Suggests"))
>> >> #install.packages("caret", dependencies = c("Depends",
>"Suggests"))
>> >>
>> >> caret adds new algorithms fairly often but does not put them into
>> >> suggests.
>> >> On Tue, Aug 1, 2017 at 12:45 AM, Bert Gunter
>
>> >> wrote:
>> >>>
>> >>> ?install.packages
>> >>>
>> >>> and pay attention to the "dependencies" argument.
>> >>>
>> >>> Th RStudio interface does not appear to allow for "suggests"
>packages
>> >>> (correction appreciated if this is wrong) , which the command
>line
>> >>> makes available.
>> >>>
>> >>> HTH.
>> >>>
>> >>> Cheers,
>> >>> Bert
>> >>>
>> >>>
>> >>> Bert Gunter
>> >>>
>> >>> "The trouble with having an open mind is that people keep coming
>along
>> >>> and sticking things into it."
>> >>> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip
>)
>> >>>
>> >>>
>> >>> On Mon, Jul 31, 2017 at 5:07 AM, Dimlak Gorkehgz
>> >
>> >>> wrote:
>> >>> > I am testing most of the models caret supports on a bunch of
>PCs.
>> >>> > Unfortunately caret "suggested" packages do not include most of
>the
>> >>> > model
>> >>> > packages available to caret. Every time a new version of R
>comes out
>> I
>> >>> > have
>> >>> > to sit in front of each PC and wait for each prompt to press
>the 1
>> >>> > button
>> >>> > and Enter. Is there an option I could set to tell R or Rstudio
>to
>> just
>> >>> > install anything asked for? A for every a/s/n prompt too.
>> >>> >
>> >>> > [[alternative HTML version deleted]]
>> >>> >
>> >>> > __
>> >>> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more,
>see
>> >>> > https://stat.ethz.ch/mailman/listinfo/r-help
>> >>> > PLEASE do read the posting guide
>> >>> > http://www.R-project.org/posting-guide.html
>> >>> > and provide commented, minimal, self-contained, reproducible
>code.
>> >>
>> >>
>> >
>>
>
>   [[alternative HTML version deleted]]
>
>__
>R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-co

Re: [R] Use case for HDF5 dataspace interface

2017-08-01 Thread Bert Gunter
1. What does this have to do with R?

2. If it concerns computational biology, the Bioconductor Help list
may be a better place to post.


Cheers,
Bert


Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Tue, Aug 1, 2017 at 2:28 AM, Koustav Pal  wrote:
> This question is a clone of my stackoverflow question which never got
> answered (o_O). Therefore I am posting it here. I would really like some
> inputs if possible.
>
> I am currently building some applications which make use of HDF5 files.
>
> I have already taken a look at the hdfgroup website with regards to
> dataspace 
> and I think I understand the concept. But I am very much unable to
> understand it's real world use.
>
> Can someone please, tell me what is the dataspace interface supposed to be
> used for?
>
> Currently, I think if I load a matrix of size 1.5M x 1.5M I may be able to
> store dataspace coordinates and then retrieve that piece of data much
> faster. Is this correct?
>
> It would be great if you can provide some example use cases.
>
>
> Link to original question:
> https://stackoverflow.com/questions/44697599/hdf5-dataspace-interface-what-does-it-do-and-what-is-its-real-world-applicati
>
> ---
> Koustav Pal,
> PhD student in Computational Biology,
> Francesco Ferrari's group,
> IFOM - The FIRC Institute of Molecular Oncology
> Milan, Italy.
>
> [[alternative HTML version deleted]]
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How automatic Y on install y/n prompts?

2017-08-01 Thread Dimlak Gorkehgz
You are right, maintainer does keep a list of model's packages.

So how do I use a variable instead of $adaboost$?

getModelInfo()$adaboost$library



Also, server not found:
http://rwiki.sciviews.org/doku.php?id=getting-started:reference-cards:getting-help

On Tue, Aug 1, 2017 at 11:46 AM, Bert Gunter  wrote:

> I have provided you all the "advice" I can. Sorry it didn't help. You
> should re-post your responses to me to r-help so that others might
> help. you might also email the maintainer, found via the maintainer()
> function, who may not monitor the list.
>
> Cheers,
> Bert
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along
> and sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>
>
> On Mon, Jul 31, 2017 at 9:38 PM, Dimlak Gorkehgz 
> wrote:
> >  tools::package_dependencies(packs, available.packages(),
> > + which=c("Imports",
> "LinkingTo","Enhances"), #
> > + recursive=T)
> >
> >
> >
> > (and suggests, and imports, and everything) does not include most
> packages
> > needed by every model. Recursive everything downloads most of all
> packages
> > available of CRAN. And then some necessary packages are not available and
> > every pass through brings up a prompt for them.
> >
> >
> >
> >
> > On Tue, Aug 1, 2017 at 11:12 AM, Dimlak Gorkehgz 
> > wrote:
> >>
> >> Excuse me if I did not explain myself correctly but I currently use:
> >>
> >> list.of.packages <- c("caretEnsemble","logicFS","
> >> RWeka","ordinalNet","xgboost","mlr","caret","MLmetrics","
> bartMachine","spikeslab","party","rqPen","monomvn","
> foba","logicFS","rPython","qrnn","randomGLM","msaenet","
> Rborist","relaxo","ordinalNet","rrf","frbs","extraTrees","
> ipred","elasticnet","bst","brnn","Boruta","arm","elmNN","
> evtree","extraTrees","deepnet","kknn","KRLS","RSNNS","partDSA","plsRglm","
> quantregForest","ranger","inTrees")
> >> new.packages <- list.of.packages[!(list.of.packages %in%
> >> installed.packages()[,"Package"])]
> >> if(length(new.packages)) install.packages(new.packages, dep = TRUE)
> >>
> >> #install.packages("mlr", dependencies = c("Depends", "Suggests"))
> >> #install.packages("caret", dependencies = c("Depends", "Suggests"))
> >>
> >> caret adds new algorithms fairly often but does not put them into
> >> suggests.
> >> On Tue, Aug 1, 2017 at 12:45 AM, Bert Gunter 
> >> wrote:
> >>>
> >>> ?install.packages
> >>>
> >>> and pay attention to the "dependencies" argument.
> >>>
> >>> Th RStudio interface does not appear to allow for "suggests" packages
> >>> (correction appreciated if this is wrong) , which the command line
> >>> makes available.
> >>>
> >>> HTH.
> >>>
> >>> Cheers,
> >>> Bert
> >>>
> >>>
> >>> Bert Gunter
> >>>
> >>> "The trouble with having an open mind is that people keep coming along
> >>> and sticking things into it."
> >>> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
> >>>
> >>>
> >>> On Mon, Jul 31, 2017 at 5:07 AM, Dimlak Gorkehgz  >
> >>> wrote:
> >>> > I am testing most of the models caret supports on a bunch of PCs.
> >>> > Unfortunately caret "suggested" packages do not include most of the
> >>> > model
> >>> > packages available to caret. Every time a new version of R comes out
> I
> >>> > have
> >>> > to sit in front of each PC and wait for each prompt to press the 1
> >>> > button
> >>> > and Enter. Is there an option I could set to tell R or Rstudio to
> just
> >>> > install anything asked for? A for every a/s/n prompt too.
> >>> >
> >>> > [[alternative HTML version deleted]]
> >>> >
> >>> > __
> >>> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >>> > https://stat.ethz.ch/mailman/listinfo/r-help
> >>> > PLEASE do read the posting guide
> >>> > http://www.R-project.org/posting-guide.html
> >>> > and provide commented, minimal, self-contained, reproducible code.
> >>
> >>
> >
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R-Package for Recursive Partitioning without Classification or Regression

2017-08-01 Thread Michal Kubista
Hello Tom,
what you describe seems like using hierarchical clustering and
plotting a dendrogram to me, even though only in the "visual" way, not
in the math behind the algorithms.

Are you looking for something like this?
https://rpubs.com/gaston/dendrograms

Just please note, that this is very far from rpart in term of how the
algorithms work (already mentioned by Bert Gunter)

Best,
Michal

2017-07-28 14:56 GMT+02:00 Tom D. Harray :
> Hello,
>
> I have a question related to recursive partitioning, but I cannot find
> an answer, likely because I don't know how to properly word my Google
> search query.
>
>
> All recursive partitioning examples, which I can find, are used for
> either classification or regression trees like
>
>library(tree)
>data(iris)
>tree(Species ~ Sepal.Width + Petal.Width, data = iris)
>
> which implies building a model. However, I would like to split data
> like clustering similar to decision tree methods, because I have
> nothing to predict.
>
>
> My question is: Is there a package, which I can use to partition my
> data without classification or regression so that it resembles
> clustering methods?
>
>
> Thanks and regards,
>
> Dirk
>
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Use case for HDF5 dataspace interface

2017-08-01 Thread Koustav Pal
This question is a clone of my stackoverflow question which never got
answered (o_O). Therefore I am posting it here. I would really like some
inputs if possible.

I am currently building some applications which make use of HDF5 files.

I have already taken a look at the hdfgroup website with regards to
dataspace 
and I think I understand the concept. But I am very much unable to
understand it's real world use.

Can someone please, tell me what is the dataspace interface supposed to be
used for?

Currently, I think if I load a matrix of size 1.5M x 1.5M I may be able to
store dataspace coordinates and then retrieve that piece of data much
faster. Is this correct?

It would be great if you can provide some example use cases.


Link to original question:
https://stackoverflow.com/questions/44697599/hdf5-dataspace-interface-what-does-it-do-and-what-is-its-real-world-applicati

---
Koustav Pal,
PhD student in Computational Biology,
Francesco Ferrari's group,
IFOM - The FIRC Institute of Molecular Oncology
Milan, Italy.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.