Still overkill, I believe.
" Unlike using the numeric levels, that doesn't fail if some of the
levels I expect are absent; it only fails (and does so visibly) when
there's a value in there that I haven't assigned a coding to. So it's
a tad more robust. "
If you are concerned about missing level
Dear R experts,
Maybe my question is too basic and I apologize for that. I am having an
issue currently by trying to change manually the symbols of the series. I
need to put them manually, instead of using the symbols that R gives by
default and produce a plot with the classic style. For example I
> Well, I think that's kind of overkill.
Depends whether you want to recode all or some, and how robust you want the
answer to be.
recode() allows you to recode a few levels of many, without dependence on level
ordering; that's kind of neat.
tbh, though, I don't use recode() a lot; I generall
Granted,, there are better solutions than my "KISS" (keep it simple and
stupid) example.
Hopefully, Christoph will have learned from both.
Best,
Adrian
On 10 Oct 2016 13:44, "PIKAL Petr" wrote:
> Hi
>
>
>
> Given this example data, you can get same answer with less typing and
> without loops.
Hi Margaret,
This may be a misunderstanding of your request, but what about:
mydata<-data.frame(oldvar=paste("topic",sample(1:9,20,TRUE),sep=""))
mydata$newvar<-sapply(mydata$oldvar,gsub,"topic.","parenttopic")
Jim
On Tue, Oct 11, 2016 at 1:56 AM, MACDOUGALL Margaret
wrote:
> Hello
>
> The R c
Thank you for the valued suggestions in response to my query.
Margaret
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
-Original Message-
From: Fox, John [mailto:j...@mcmaster.ca]
Sent: 10 October 2016 20:32
To: MACDOUGA
Dear Margaret,
You've had one suggestion of an alternative for recoding variables, but in
addition your code is in error (see below).
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of
> MACDOUGALL Margaret
> Sent: Monday, October 10, 2016 10:56 AM
> T
Hi Roy,
Thanks for your help. It works perfectly. if I am trying to read multiple
files similar ways, how do I do that?
with regards
-Deb
On Fri, Sep 30, 2016 at 5:53 PM, Roy Mendelssohn - NOAA Federal <
roy.mendelss...@noaa.gov> wrote:
> Hi Deb:
>
> > > gribfile <- 'http://thredds.ucar.edu/thr
Well, I think that's kind of overkill.
Assuming "oldvar" is a factor in the data frame mydata, then the
following shows how to do it:
> set.seed(27)
> d <- data.frame(a = sample(c(letters[1:3],NA),15,replace = TRUE))
> d
a
1
2 a
3
4 b
5 a
6 b
7 a
8 a
9 a
10
Your code suggests that you do not understand R or what you are doing. The line
mydata$newvar[oldvar = "topic1"] <- "parenttopic"
does not recode cases where oldvar is "topic1", it creates a new variable
called oldvar (not the same as mydata$oldvar) and sets it to "topic1" because a
single equa
> On Oct 10, 2016, at 11:39 AM, David Winsemius wrote:
>
>
>> On Oct 10, 2016, at 7:03 AM, Pitch Mandava via R-help
>> wrote:
>>
>> I am trying to run the example from Hmisc package in RStudio environment
>> under Windows 10 and downloaded ld98.exe> .libPaths()Produces the following
>> out
> On Oct 10, 2016, at 7:03 AM, Pitch Mandava via R-help
> wrote:
>
> I am trying to run the example from Hmisc package in RStudio environment
> under Windows 10 and downloaded ld98.exe> .libPaths()Produces the following
> output[1] "C:/Users/username/X1_Carbon/Documents/R/win-library/3.2"[2]
thanks Jonh Fox! :-)
my solution (partial and temporary) was as follows.
cleber
( for the r-help history file )
library( tcltk )
# from ?.Tcl
f <- function()cat("HI!\n")
.Tcl.callback(f)
sink("simpletest.tcl")
cat('toplevel .t\n')
cat('button .t.b -
Dear R users,
I'm pleased to announce that my first package has been accepted in CRAN.
https://cran.r-project.org/web/packages/glm.predict/
With glm.predict it is possible to calculate discrete changes with
confidence intervals for glm(), glm_nb(), polr() and multinom() models.
It is p
> Is there a convenient way to edit this code to allow me to recode a list of
> categories 'topic 1', 'topic 9' and 'topic 14', say, of the the old variable
> 'oldvar'
> as 'parenttopic' by means of the new variable 'newvar', while also mapping
> system missing values to system missing values?
Yo
Hello
The R code
mydata$newvar[oldvar = "topic1"] <- "parenttopic"
is intended to recode the category 'topic 1' of the old varaible 'oldvar' a
new category label 'parenttopic' by defining the new variable 'newvar'.
Is there a convenient way to edit this code to allow me to recode a list of
ca
Thanks very much for your kindness help. I run your script then came out
lots of outputs and I also studied the solution you posted. Forgive my
ignorance, I still can't find the suitable starting values. Did I
misunderstand something?
Best,
Pinglei Gao
-邮件原件-
发件人: ProfJCNash [mailto:prof
Thanks very much for taking time on this. Your assistances are very much
appreciated. But, I am afraid that I still have a question to bother you.
I am working on a paper about weed seeds dispersal with harvest machine. I
found three general models for seed dispersal and retention after a review
For versions 1.6.1 and 2.0.0 of Spark, the GaussianMixture is under the ml
namespace not mllib, try this instead:
envir$model <- "org.apache.spark.mllib.clustering.GaussianMixture"
Best, Javier
On Sun, Oct 9, 2016 at 1:47 PM, Axel Urbiz wrote:
> Hi All,
>
> Just started to experiment with "spa
I am trying to run the example from Hmisc package in RStudio environment under
Windows 10 and downloaded ld98.exe> .libPaths()Produces the following output[1]
"C:/Users/username/X1_Carbon/Documents/R/win-library/3.2"[2] "C:/Program
Files/R/R-3.2.5/library"I moved the ld98.exe to
C:/Users/userna
We would like to announce the following statistics course:
Course: Data exploration, regression, GLM & GAM with R
Where: Montreal, Canada
When: 9-13 January 2017
Course website: http://www.highstat.com/statscourse.htm
Course flyer:
http://highstat.com/Courses/Flyers/Flyer2017_01Montreal_R
The key lines are
library(nlmrt)
test <- nlxb(expf2, start= c(b0=.1, b1=1, th=.1), trace=TRUE, data=cl)
Thus I started with .1 1 and .1. The "solution" from nlxb, which is using
analytic derivatives
and a very aggressive Marquardt code to keep trying even in bad situations, was
as you included b
Dear R users,
I would like to announce an updated version of qualpalr:
https://cran.r-project.org/package=qualpalr
qualpalr uses color difference equations to generate distinct qualitative color
palettes for use in R graphics. Version 0.2.1 has been redesigned to use a
better, more efficient o
Dear useRs,
I am happy to announce that my package "plotluck" is now on CRAN:
[1]https://cran.r-project.org/web/packages/plotluck/
The aim of the package is to let the user focus on what to plot, rather than on
the "how" during exploratory data analysis. Based on the characteristics of a
data
[markdown format]
I'm glad to introduce you the new package aVirtualTwins. This package is an
adaptation of VirtualTwins method of subgroup identification from [Foster, J.
C., Taylor, J. M.G. and Ruberg, S. J.
(2011)](http://onlinelibrary.wiley.com/doi/10.1002/sim.4322/abstract).
### Explanat
Hi
Given this example data, you can get same answer with less typing and without
loops.
res<-xtabs(~W+P+S,mydata)
res1<-which(res==0, arr.ind=T)
head(res1)
W P S
10 10 1 1
11 11 1 1
82 82 1 1
100 100 1 1
117 117 1 1
148 148 1 1
Cheers
Petr
From: dusa.adr...@gmail.com [mailto:dusa.
This is an example of how a reproducible code looks like, assuming you have
three columns in your dataset named S (store), P (product) and W (week),
and also assuming they have integer values from 1 to 19, 1 to 22 and 1 to
157 respectively:
#
mydata <- expand.grid(seq(19), seq(22), seq(15
Hi
I named your data test
res <- xtabs(~STORE+WEEK+Description, data=test)
should give you values in which there is for given Description WEEK and STORE
missing.
you can select week and store by
which(res[, ,1]==0, arr.ind=T)
for description 1 and so on.
Another option is to generate full s
Hi all,
could you please tell me if you find a solution to this problem (in
Subject)?
June Kim wrote:
>* Hello,*
>
>* I use google docs' Forms to conduct surveys online. Multiple choices*
>* questions are coded as comma separated values.*
>
>* For example,*
>
>* if the question is lik
Dear Petr,
I attached a sample file, which contains the first 4 products.
It is more that I have: 157 weeks, 19 different Stores and 22 products:
157*19*22 = 65,626 rows. And as I sated I have roughly 63,127 rows. (so some
have to be missing).
All the best,
Christoph
Hi
see in line
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Christoph
> Puschmann
> Sent: Sunday, October 9, 2016 1:27 AM
> To: Adrian Dușa
> Cc: r-help@r-project.org; Christoph Puschmann
>
> Subject: Re: [R] Loop to check for large dataset
>
>
31 matches
Mail list logo