You forgot to put the comma after "-intrain" in the following assignment:
testing <- spam[-intrain, ]
"make" is one of the data columns of spam dataset.
> colnames(spam)
[1] "make"
--
GG
[[alternative HTML version deleted]]
__
R-help@r-pro
Hi All,
Please help me in the below code:
tryCatch({
x <- capture.output(XML::xmlParse(y))
}, warning = function(w) {
x <- capture.output(w)
}, error = function(e) {
x <-capture.output(e)
}, finally = {
})
I am using Tibco Enterprise Runtime for R to get value of the parsed XML in
vector f
Hi,
I am having a problem with the use of the foreach package. It is strange
that my code works when i use the %do% function but not with %dopar%.
Let me explain. I am new to parallel and foreach packages. I have data in
the form of very large files, and they are in the form of data tables. I
have
I found some information about parallel processing in R that might be of your
interest:
http://topepo.github.io/caret/parallel.html
http://www.vikparuchuri.com/blog/parallel-r-model-prediction-building/
https://www.r-project.org/nosvn/conferences/useR-2013/Tutorials/kuhn/user_caret_2up.pdf
htt
How should the weights be treated? If they are multiple observation weights (a weight of
"3" is shorthand for 3 subjects) that leads to a different likelihood than sampling
weights ("3" means to give this one subject more influence). The clogit command can't
read your mind and so has chosen no
Dear all,
I am hoping to use the mt.maxT package, so I'm trying to understand how the
maxT algorithm works in the multtest package.
I have an example of data:
SNP1 p value= 0.02
SNP1 permutation p values = 0.03, 0.03, 0.03, 0.04, 0.04.
SNP2 p value =0.03
SNP2 permutation p values = 0.4,0.5,0
Further, trying to be more specific about checkpoint with R, I may suggest the
following readings.
Look for "checkpoint models" in:
http://h2o-release.s3.amazonaws.com/h2o/rel-tibshirani/8/docs-website/h2o-docs/booklets/DeepLearning_Vignette.pdf
Look for "checkpointing" i
Dear List,
some days ago my R started to regularily freezes, especially during
these operations:
mso(,permutations=999), package vegan
anova.cca(), package vegan
forward.sel(), package packfor
I am running R on a 64-bit Windows 7 installation, 4 cores, 8 GB RAM.
I just today updated R to 3.2.
Look at scatter3d() in the car package. It has an option to add a confidence
ellipsoid to an interactive 3d plot.
-
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352
-Original Message-
From: R-help [mailto:
Dear R-List members,
I have to compare how similar two types of forest (old growth=O) and (young
forest=Y) in terms of moth communities are.
I sampled moths at 4 O and 4 Y sites.
I need to analyse the data using a PERMANOVA approach. But I am having a really
hard time to do this in R.
I found o
Hi All,
I used mice to impute NA values in a data frame like this:
envdata = complete(mice(envdata,m=1,maxit=1)).
It seems that the mice function can only works well with 1st and 2nd envdata.
When enter the 3rd data, it triggers an error: data.
iter imp variable
1 1 data data10
Hi Rolf
Thank you for your reply and time.Please let me provide more information about
my problem.
My data is like this (I obtained itwith the kind support of WCC), it shows the
number of counted cars for eachinterval like this:
timenum,count
1,1800
2,1400
4,1000
..
1,86868
It means I ha
Hallow everybody
I want to know if there is any command for input colour in the ribbon plot
(geom ribbon) of ggplot2. Unless that, the mean line and the standard error
can not be distinguished. Please help me if anyone have any idea.
--
Pushan Chakraborty
CSIR - SRF
Center for Pollination Studie
Hello!
I have a solution for my task that is based on a loop. However, it's
too slow for my real-life problem that is much larger in scope.
However, I cannot use merge. Any advice on how to do it faster?
Thanks a lot for any hint on how to speed it up!
# I have 'mydata' data frame:
set.seed(123)
m
Hi all,
I cannot for the life of me get my axis titles to adjust vertically in a
ggplot. I've seen several posts about this and have tried everything:
keeping vjust within 0 and 1, adjusting the margins, etc. hjust is behaving
just as it should but vjust just mocks me in silence. No error message
That looks to me like it might be buggy. At least I would have
expected vjust to do _something_.
In terms of the practical issue, you can adjust the distance between
the title and the axis with margin, e.g.
ggplot(data=x,aes(x=V2,y=V2))+theme(axis.title.y=element_text(margin =
margin(0, 5, 0, 0))
Are you sure it is not working for you? Your example code did not work for me
at all until I removed the plot .margin parameter (unit wasn't recognized).
Once I did that hjust and vjust worked as expected. However, values between .1
and .9 for vjust don't really move the axis title very much
> On 22 Dec 2015, at 07:30 , mohsen hs via R-help wrote:
>
> The above command gives me a differentplot. I am not sure what part I am
> doing wrong. I appreciate your time forconsidering my request and your
> feedback is highly appreciated. Please find the plots attached. The right one
> is f
Hi Dan,
Chances are that you haven't yet upgraded to ggplot2 version 2.0. unit
(as well as arrow and alpha) are now re-exported from ggplot2.
Using the latest release I also see that vjust doesn't seem to do anything.
Best,
Ista
On Tue, Dec 22, 2015 at 1:37 PM, Nordlund, Dan (DSHS/RDA)
wrote:
Ista,
You are correct, I was not at the latest release of ggplot2. I updated to the
latest version and am now seeing the same result as you and the OP. So it does
look like an issue with the latest version of ggplot2.
Dan
Daniel Nordlund, PhD
Research and Data Analysis Division
Services & En
You seem to be saving 'myid' and then overwriting it with the last
statement:
result[[i]] <- result[[i]][c(5, 1:4)]
Why doesn't 'merge' work for you? I tried it on your data, and seem to get
back the same number of rows; may not be in the same order, but the content
looks the same, and it does
Library dplyr to use arrange() for ordering, in the case.
library(dplyr)
result.order <- arrange(result, d, version, a, b, c)
dim(result.order)
[1] 30005
head(result.order)
d versiona b c
1 -2.986456069 1 0.2236414154 0.004258038663 1.089
It is not clear what you are doing. Please provide some code and data if
possible.
Otherwise adding something like colour = "red" in the aes() should do
something.
John Kane
Kingston ON Canada
> -Original Message-
> From: pushan.zool...@gmail.com
> Sent: Tue, 22 Dec 2015 14:26:03 +0
Um, NOT in the aesthetic... as a direct argument to geom_ribbon.
But yes, examples are critical for communication about R questions, and
posting on plain text format is critical for getting the example through the
list server undamaged.
--
Sent from my phone. Please excuse my brevity.
On Dec
I know I am overwriting.
merge doesn't solve it because each version in mydata is given to more
than one id. Hence, I thought I can't merge by version.
I am not sure how to answer the question about "the problem".
I described the current state and the desired state. If possible, I'd
like to get fro
You are right, guys, merge is working. Somehow I was under the
erroneous impression that because the second data frame (myinfo)
contains no column 'myid' merge will not work.
Below is the cleaner code and comparison:
#
### Example with smaller data frames
##
Actually, the correct merge line should be:
my.merge <- merge(myinfo, mydata, by="version", all.x = T, all.y = F)
On Tue, Dec 22, 2015 at 3:50 PM, Dimitri Liakhovitski
wrote:
> You are right, guys, merge is working. Somehow I was under the
> erroneous impression that because the second data frame
Dear group
I used to run Rstudio on windows.
currently I want to run Rstudio on Ubuntu server, start its GUI .
kindly, is there a guide on how to do this step by step, I already searched and
installed R .. but confused ..should I install Rstudio for desktop or server ?
how to start it?, I am the
Taking it back - no need for all.x = T, all.y = F
On Tue, Dec 22, 2015 at 3:56 PM, Dimitri Liakhovitski
wrote:
> Actually, the correct merge line should be:
> my.merge <- merge(myinfo, mydata, by="version", all.x = T, all.y = F)
>
> On Tue, Dec 22, 2015 at 3:50 PM, Dimitri Liakhovitski
> wrote:
This is not the support area for RStudio.
FWIW if you will be sitting in front of this computer then you probably want
the desktop version.
--
Sent from my phone. Please excuse my brevity.
On December 22, 2015 1:10:58 PM PST, Ragia Ibrahim wrote:
>Dear group
>I used to run Rstudio on windows.
# I have a matrix x:
k <- 20
N <- 5
set.seed(123)
x <- matrix(c(sample(1:k, N, replace = F),
sample(1:k, N, replace = F),
sample(1:k, N, replace = F),
sample(1:k, N, replace = F),
sample(1:k, N, replace = F),
sample(1:k, N, repl
> On Dec 22, 2015, at 4:42 PM, Dimitri Liakhovitski
> wrote:
>
> # I have a matrix x:
>
> k <- 20
> N <- 5
> set.seed(123)
> x <- matrix(c(sample(1:k, N, replace = F),
> sample(1:k, N, replace = F),
> sample(1:k, N, replace = F),
> sample(1:k, N, replace
... Perhaps worth noting is that the row indices can be created
directly without row():
result[cbind(rep.int(seq_len(6),5), as.vector(x))] <- 1
but the downside is that you have to know that a matrix is a vector
"stored" in column major order. I find this arcane detail quite handy,
though.
Cheer
Please keep the discussion on the mailing list by using reply-to-all.
That function makes no line representing "mean". If you want a line in the
middle then you need to add it yourself. The color attribute for geom_ribbon
affects the outline of that ribbon area.
--
Sent from my phone. Please e
Thanks for the help in my previous quarry, I want to know is it possible to
change the colour in geom line?
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/li
Yes.
This forum works best when you provide example code. For questions like this
you really should use a web search engine. Google comes up with many results,
including [1].
[1]
http://www.ucl.ac.uk/~zctpep9/Archived%20webpages/Cookbook%20for%20R%20%C2%BB%20Colors%20(ggplot2).htm
--
Sent f
Hi,
I am trying to use caret, for feature selection on glmnet. I get a strange
error like below - "arguments imply differing number of rows: 2, 3".
x <- data.matrix(train[,features])
y <- train$quoteconversion_flag
> str(x)
num [1:260753, 1:297] NA NA NA NA NA NA NA NA NA NA ...
- attr(
Dear list
I want to put a line command in the following and also want to attribute
colour in the geom line command line. It would be a ribbon plot showing the
mean line. Is there any help?
p <- ggplot(mtcars, aes(x=carb, y=mpg)) + geom_point()
p + stat_summary(geom="ribbon", fun.ymin="min", fun
On Tue, 22 Dec 2015 16:13:07 +0100
Tim Richter-Heitmann wrote:
> Dear List,
>
> some days ago my R started to regularily freezes, especially during
> these operations:
>
> mso(,permutations=999), package vegan
> anova.cca(), package vegan
> forward.sel(), package packfor
>
> I am running R on
39 matches
Mail list logo