Displaying 20 results from an estimated 10000 matches similar to: "text display using expression or not"
2018 Mar 17
0
length of 'dimnames' [2] not equal to array extent- For Correlation Plot
That does clarify for me that you're missing a step: I didn't clearly
follow your description at first.
corrplot expects a correlation matrix, not your original data. You need to
use cor() first.
That's pretty clear in the documentation. See for instance the examples:
data(mtcars)
M <- cor(mtcars)
corrplot(M)
Sarah
On Sat, Mar 17, 2018 at 12:00 PM Shivi Bhatia <shivipmp82 at
2011 Jul 29
3
help with plot.rpart
? data=read.table("http://statcourse.com/research/boston.csv", , sep=",",
header = TRUE)
? library(rpart)
? fit=rpart (MV~ CRIM+ZN+INDUS+CHAS+NOX+RM+AGE+DIS+RAD+TAX+ PT+B+LSTAT)
Please: Show me the tree.
Mark
-------- Original Message --------
Subject: Re: [R] help with rpart
From: "Stephen Milborrow" <[1]milbo at sonic.net>
2016 Apr 15
0
Decision Tree and Random Forrest
Since you only have 3 predictors, each categorical with a small number of
categories, you can use expand.grid to make a data.frame containing all
possible combinations and give that the predict method for your model to
get all possible predictions.
Something like the following untested code.
newdata <- expand.grid(
Humidity = levels(Humidity), #(High, Medium,Low)
2016 Apr 15
1
Decision Tree and Random Forrest
I need the output to have groups and the probability any given record in
that group then has of being in the response class. Just like my email in
the beginning i need the output that looks like if A and if B and if C then
%77 it will be D. The examples you provided are just simply not similar.
They are different and would take interpretation to get what i need.
On Apr 14, 2016 1:26 AM,
2011 Jul 29
1
help with predict.rpart
? data=read.table("http://statcourse.com/research/boston.csv", ,
sep=",", header = TRUE)
? library(rpart)
? fit=rpart (MV~ CRIM+ZN+INDUS+CHAS+NOX+RM+AGE+DIS+RAD+TAX+
PT+B+LSTAT)
predict(fit,data[4,])
plot only reveals part of the tree in contrast to the results on obtains
with CART or C5
-------- Original Message --------
Subject: Re: [R] help with rpart
From: Sarah
2016 Apr 14
3
Decision Tree and Random Forrest
I still need the output to match my requiremnt in my original post. With decision rules "clusters" and probability attached to them. The examples are sort of similar. You just provided links to general info about trees.
Sent from my Verizon, Samsung Galaxy smartphone<div>
</div><div>
</div><!-- originalMessage --><div>-------- Original message
2011 Aug 01
1
Inserting column in between -- "better" way?
Folks:
I consider my reply below rather clumsy: One has to keep track of
index numbers other than that which is inserted and must separately
change column names. Is there as "essentially better" way to do this,
either via base R or via an R package. I leave it to you to define
"essentially better."
Thanks.
Cheers,
Bert
On Mon, Aug 1, 2011 at 10:17 AM, Bert Gunter
2011 Dec 12
1
how to colour labels (each label with a colour) in a dendrogram?
Hello to all,
I still have this doubt.
I'd like to colour the different labels of my dendrogram each one with a
different colour. How can I do? I guess I could do using *edgetext* and
then *t.col* or* lab.col* but I don't know how to add edgetext to my
dendrogram. Can you help me please?
Example:
require(graphics); require(utils)
hc <- hclust(dist(USArrests), "ave")
(dend1
2018 Mar 17
3
length of 'dimnames' [2] not equal to array extent- For Correlation Plot
Hi Sarah,
Thank you for your help.
I tried using CR1<-as.matrix(CR1) but gives error Error in corrplot(CR1,
method = "circle") : The matrix is not in [-1, 1]!. I am using a corrplot
library.
Please find the reproducible example:
dput(head(CR1,10))
structure(c(26L, 46L, 39L, 38L, 47L, 59L, 56L, 61L, 43L, 60L,
78L, 63L, 2L, 58L, 8L, 1L, 1L, 9L, 11L, 2L, 1037500L, 46747L,
346300L,
2018 May 11
0
add one variable to a data frame
Sarah's solutions are good, and here's another, even more basic:
tmp1 <- unique(dat1$B)
tmp2 <- seq_along(tmp1)
dat1$C <- tmp2[ match( dat1$B, tmp1) ]
> dat1
N B C
1 1 29_log 1
2 2 29_log 1
3 3 29_log 1
4 4 27_cat 2
5 5 27_cat 2
6 6 1_log 3
7 7 1_log 3
8 8 1_log 3
9 9 1_log 3
10 10 1_log 3
11 11 3_cat 4
12 12 3_cat 4
As a single line
2017 Oct 31
0
convertTime package.
Hi Scott,
Where did you get this function originally? I can't find anything about it.
What OS are you using?
What says, "not available for the version"? Where are you getting that error?
What are you trying to accomplish? What does that function actually
do? It's impossible to suggest a work-around for a function of unknown
purpose and origin.
(The posting guide for this
2012 Feb 02
4
an unusual use for R
I thought some of you might be amused by this.
In my non-work time, I'm an avid weaver and teacher of weaving. I'm
working on a project involving creating many detailed weaving
patterns, so I wrote R code to automate it.
Details here:
http://stringpage.com/blog/?p=822
If the overlap between R users and avid tablet weavers turns out to be
>> 1, I'll polish it up and turn it
2018 May 11
3
add one variable to a data frame
Hi Sarah,
Thank you so much!! I got your good ideas.
Ding
-----Original Message-----
From: Sarah Goslee [mailto:sarah.goslee at gmail.com]
Sent: Friday, May 11, 2018 11:40 AM
To: Ding, Yuan Chun
Cc: r-help mailing list
Subject: Re: [R] add one variable to a data frame
[Attention: This email came from an external source. Do not open attachments or click on links from unknown senders or
2008 Jul 18
1
par("din") vs dev.size()
Hello,
I was messing around with graphics, and noted an odd behavior of par("din"). If
the x11 device is empty, par("din") does not return the correct size
if the device
has been resized manually. dev.size() works correctly.
R version 2.7.1; Fedora 8
# case 1 - empty device
> x11()
> dev.size()
[1] 6.995263 6.994187
> par("din")
[1] 6.995263 6.994187
#
2018 May 30
0
par(mfrow=c(3,4)) problem
Hi,
You're mixing base plot and ggplot2 grid graphics, which as you've
discovered doesn't work.
Here's av strategy that does:
https://cran.r-project.org/web/packages/egg/vignettes/Ecosystem.html
This vignette has a good overview, well as info specific to that package.
Sarah
On Wed, May 30, 2018 at 4:43 AM greg holly <mak.hholly at gmail.com> wrote:
> Hi all;
>
2017 Jun 30
3
Predict
Sorry for the confusion, here is the edited question.
The data= Stand_Height (attached) is recorded from 12/1/2009 to
12/31/2015 (25 observations) and the other dataset (leafbiom) is
recorded from 10/7/2009 to 12/29/2016 (daily observations).
I want to use the 25 observations of stand height to predict the daily
stand height from 10/7/2009 to 12/29/2016. The daily stand height will
be multiplied
2017 Jun 25
0
Help to organize data
This is pretty badly mangled (please don't post in html), but
?aggregate
is probably what you want.
Sarah
On Sun, Jun 25, 2017 at 5:27 PM, Jackson Rodrigues
<jacksonmrodrigues at gmail.com> wrote:
> Hi everybody,
>
> My name is Jackson and come here ask for a help to organize data.
> I really need help from you. I have several data sets to organize.
>
> I have to
2018 May 11
2
add one variable to a data frame
Sarah et. al.:
As a matter of aesthetics (i.e. my personal ocd-ness) I prefer using the
public API of an object, i.e. *not* to makes use of the representation of a
factor as essentially an integer vector with labels, but rather to use its
documented behavior. (Feel free to ignore this remark!)
Anyway,
>cumsum(!duplicated(dat1$B))
[1] 1 1 1 2 2 3 3 3 3 3 4 4
will do it.
This is very
2012 Mar 07
1
a somewhat related cartoon
Quoting from today's PhD Comics, available at:
http://www.phdcomics.com/comics.php?f=1476
What the methodology section says: "Analysis was performed using a
commercially available software package."
What it really means: "I put the numbers into this magic box and out
came my thesis!"
--
Sarah Goslee
http://www.functionaldiversity.org
2012 Nov 06
1
options()$width ignored by print.formula
Hi all,
I'm working with summary.gam() and noticed that the options()$width
argument is ignored by some components of that function, in particular
the formula, which is printed at an arbitrary length regardless of the
desired width.
I've tracked the problem back to print.formula(), so at a lower level
than summary.gam(). Is there a way around this that I'm missing?
library(mgcv)
#