I've seen similar issues reported on the RStudio community site:
https://community.rstudio.com/. You might want to check in there, as I
think this may well be an RStudio issue rather than a problem with R itself.
Dave
On 26 October 2017 at 12:11, Eric Berger wrote:
> How about going back to ea
I'm having a problem using the xlevels option with effect (or Effect) with
objects of class clm, which seems to have no impact on the output (whereas
it does for models of class polr). Can anyone suggest how to fix this?
Thanks,
David
Here's an example:
mod.wvs <- MASS::polr(poverty ~ gender +
ifelse is vectorised, so just use that without the loop.
colordata$response <- ifelse(colordata$color == 'blue', 1, 0)
David
On 7 April 2016 at 12:41, Michael Artz wrote:
> Hi I'm not sure how to ask this, but its a very easy question to answer for
> an R person.
>
> What is an easy way to che
Why not use rep instead of gl:
levels <- c('BR', 'CNS', 'CO', 'LE', 'ME', 'LC', 'OV', 'PR', 'RE')
reps <- c(4, 6, 7, 6, 10, 9, 7, 2, 8)
rep(levels, reps)
David
On 10 February 2016 at 05:02, hehsham alpukhity via R-help <
r-help@r-project.org> wrote:
> I am trying to use the function gl (generat
You need to put the expression on the right of the colon in your for
statement in parenthesis:
for (i in 1:(ncol(MD_dist) - 1)){
...
}
On 7 July 2015 at 19:00, Karl Schilling wrote:
> Dear All:
>
> I want to use seq() inside a for-loop and use the looping counter i as the
> "by" argument in seq(
as.yearmon(allchem$sampdate)
worked for me.
David
On 26 June 2015 at 19:44, Rich Shepard wrote:
> Data file 'example.dat' has this format:
>
> stream,sampdate,param,quant
> B,1992-03,Cl,4
> B,1992-03,SO4,33
> B,1992-03,pH,8.43
> B,1992-04,Cl,4
> B,1992-04,SO4,32
> B,1992-04,pH,8.46
> B,1992-0
Does the package semPlot not do what you want? I notice that you got
an error when you used library(semPlot) because you don't have all the
dependencies installed. When you have semPlot working, it should be
able to produce a graphical output of the results, including
'covariance arrows'.
David
Most of this question is over my head, I'm afraid, but looking at what
I think is the crux of your question, couldn't you achieve the results
you want in two steps, like this:
dta <- data.frame(ID=c(1,1,1,1,2,2,3,3,3,3),
Day=c(1,2,4,7,2,3,1,3,4,8),Pain=c(10,9,7,2,8,7,10,6,6,2))
l1 <- tapply(dta$D
It's in the magrittr package.
David
On 17 February 2015 at 19:41, André de Boer wrote:
> Hello,
>
> Where can I find info about the operator %>%?
> Never used it but when I search for it I gives no result.
>
> Thanks,
> André
>
> __
> R-help@r-project.
There are two straightforward ways of modelling overdispersion:
1) Use glm as in your example but specify family=quasipoisson.
2) Use glm.nb in the MASS package, which fits a negative binomial model.
On 1 February 2015 at 16:26, JvanDyne wrote:
> I am trying to use Poisson regression to model
Hi Richard,
You could also do it using the package dplyr:
dta <- data.frame(Name=c('John','Mary','Sam','John'),
CheckInDate=as.Date(c('1/3/2014','1/3/2014','1/4/2014','1/4/2014'),
format='%d/%m/%Y'),
Temp=c(97,98.1,97.5,99))
library(dplyr
I'm puzzled as to why I get this behaviour with str_split_fixed in the
stringr package.
> stringr::str_split_fixed('ab','',2)
[,1] [,2]
[1,] "" "ab"
> stringr::str_split_fixed('ab','',3)
[,1] [,2] [,3]
[1,] "" "a" "b"
In the first example, I was expecting to get
[,1] [,2]
[1,
Your data are wrong. The 'event' variable (dead in your example) needs
to be 1 for cases that end in an event and 0 for spells that are
censored: yours is the other way around. If you change the 'dead'
variable to c(1,0,1) you will get the desired result.
If you really need to reverse the behavio
Your problem is that you are subsetting the dataset on line 13 of the
function, but then on the following line you attempt to add predicted
values from the complete data used to fit the model. You'll have to subset
that as well (and the same would be true for the following line where you
attempt to
17 4 4
Hope this helps.
Dave
David Barron
51 Stratfield Road
Oxford OX2 7BG
01865 512938
07595 090381
On 24 March 2014 18:47, Megan Weigel wrote:
> Hello,
>
> I need to combine two data sets into one. For example:
>
> Dataset1:
> Code Cap04
> 2120
&g
This would do it in your example:
> levels(animals$V1) <- c("cat","tiger","dog","fish")
> table(animals)
cattigerdog fish
2 200
HTH
David
cat tiger dog fish
2 2 0 0
On 11 April 2012 14:21, Daniel Gabrieli wrote:
> animals = as.data
Because you have 16 variables but only 10 observations.
David
On Mon, Jun 15, 2009 at 12:09, poleteiep34 wrote:
> Hi all!
> Maybe someone could help me with the following. I know this hasn't directly
> to do with ecology but I'm also using glm.
>
> I have a list of 16 genes and 10 samples. The
ect.org mailing list
> 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.
>
--
David Barron
Said Business School
Park
Hi,
I'm not sure why you think glm doesn't provide goodness of fit tests.
Have a look at anova.glm and summary.glm. All the functions you
mention can deal with multiple predictors. multinom deals with
non-binary data. lrm will deal with ordinal data as well as binary.
polr (in the MASS package)
glespages.com>
>
> __
> R-help@r-project.org mailing list
> 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-cont
lt;->><<->><<->>
> Peter Singleton
> USFS Pacific Northwest Research Station
> 1133 N. Western Ave.
> Wenatchee WA 98801
> Phone: (509)664-1732
> Fax: (509)665-8362
> E-mail: [EMAIL PROTECTED]
>
> ______
> R-h
r#: 205366
>
> __
> R-help@r-project.org mailing list
> 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, reproduc
> R-help@r-project.org mailing list
> 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.
>
--
David Barron
Sai
an/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.
>
--
=
David Barron
Said Business School
University of Oxford
Park End Street
Oxford OX1 1HP
___
24 matches
Mail list logo