Dear members,
I'm trying to fit a GLMM using glmmPQL with a cross-nested random structure.
Basically, I have perfectly crossed observations of whether there is a relation
between two people (sender and receiver of relation) and I'd like to do a
random structure where the relations to an from t
Dear all,
I have a problem which I'm not to fix. I have the following two series:
a=structure(c(33242.5196150509, 34905.8434338503, 38490.6957848689,
38747.0287172129, 38919.1028597142, 39026.3956586941, 38705.5344288997,
38545.6274379387, 38651.2079354205, 38748.2769580121), index =
structure(
This is my reproducible example
df<-structure(list(IDANT = c(37837L, 37838L, 37839L, 37840L, 37841L,
37842L, 37843L, 40720L, 40721L, 40722L), N_TX = c(6L, 6L, 6L,
4L, 1L, 1L, 1L, 2L, 2L, 1L), TILT = c(0L, 0L, 0L, 0L, 6L, 6L,
6L, 0L, 0L, 0L), DIREZIONE = c(50L, 220L, 110L, 50L, 220L, 110L,
50L,
Is there a way to write the summary of lm objects to a text file on disk?
cat won't handle the list, dput writes everything but not in human
readable format.
Any thoughts?
Alex van der Spek
__
R-help@r-project.org mailing list
https://stat.ethz.ch/m
Say I want to compare all 5 term models from a choice of 28 different
predictors and one known. All possible combinations of 5 out of 28 is
easy to form by combn(). With some string manipulation it is also easy
to make a text representation of a formula which is easy to convert by
as.formula()
What about sink()? Or capture.outout()? Or running your models as a batch
file and saving the results?
Sarah
On Friday, August 9, 2013, Alex van der Spek wrote:
> Is there a way to write the summary of lm objects to a text file on disk?
>
> cat won't handle the list, dput writes everything but n
Hello,
Maybe the following gives you some idea on how to vary the terms.
idx <- 1:5 # or any other indexes
ftext <- paste(terms[idx], collapse = ' * ')
Hope this helps,
Rui Barradas
Em 09-08-2013 11:40, Alex van der Spek escreveu:
Say I want to compare all 5 term models from a choice of 2
To update on the use of this little string, I am trying to use it to automate
files to be loaded into a raster stack.
I think the issue I have with the string is related to the backslashes. I need
to just read the pure text so that the datasets can be sourced, though I am not
sure whether the st
Dear Daniel,
thank you very much for your reply. We checked all inputs and outputs and
there were no negative values. We eluded the phenomenon by reinstallung R
version 2.14.2 and the old FEAR package. The bootstrapping generated sound
bias-corrected efficiency values there, hence we assume it is
Hi,
I think this could help you:
https://stat.ethz.ch/pipermail/r-help/2008-January/152378.html
Best
Simon
On Aug 9, 2013, at 12:19 PM, maxbre wrote:
> This is my reproducible example
>
> df<-structure(list(IDANT = c(37837L, 37838L, 37839L, 37840L, 37841L,
> 37842L, 37843L, 40720L, 40721L,
Dear all,
I'm a newbie to R an would like to calculate McDonald's Omega.
I installed the packages psych, GPArotation and used the suggested syntax
omega(m,nfactors=3,fm="minres",...).
Up to this point, it works.
Nevertheless, I read that omega-h "is not meaningful for a 1-factor
solution".
What I
Hello!
I am new in the mailing list for R help and I hope to be able to formulate a
good question easy to understand.
After trying to do many different things to solve an error I do not find the
solution.
I am modeling my data set with hurdle negative binomial mixed effects, to find
the corre
I am confused about what I believed was artefects from reading .csv files with
big numbers.
Finally I checked using the console and this is what I get, the same as when
importing:
>
>longnumber<-63502481056038
>longnumber
[1] 635024810560380032
I have tried setting "options(digits=22) and al
Bogaso wrote
> Hello all,
>
> I was trying to load a .r file using source() ... functions ... however
> getting
> following error:
>
>> source("D:/Book Code.r")
> Error in sys.call(sys.parent()) : node stack overflow
I realise the above message is quite old, just a quick reply if anyone is
enc
Hi,
Say I have
function(aa,bb,cc) { does something }
and I want to go through all (or a subset) of function arguments to check if
they're missing. Of course, I can check each one in turn, ie.
if (missing(aa)) {}
if (missing(bb)) {}, etc.
But is there a construct like the follo
FAQ 7.31 is a start.
Understand the "precision" of floating point numbers. You probably only
have about 15 digits (54 bits) of significance.
If you need unlimited number of digits, there are some other alternatives.
On Fri, Aug 9, 2013 at 5:54 AM, Johan Nyberg wrote:
> I am confused about w
The link to FAQ 7.31 is
http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f
Jean
On Fri, Aug 9, 2013 at 8:16 AM, jim holtman wrote:
> FAQ 7.31 is a start.
>
> Understand the "precision" of floating point numbers. You probably only
> have about 15
On Aug 9, 2013, at 13:26 , Rui Barradas wrote:
> Hello,
>
> Maybe the following gives you some idea on how to vary the terms.
>
> idx <- 1:5 # or any other indexes
> ftext <- paste(terms[idx], collapse = ' * ')
You're not the first to use this sort of technique - it is happening in various
Hello R-Help,
I have a variable with > 32 levels and I'd like to split this into two
variables such that both new variables have >= 32 variables. This is
to handle the limit of 32 level predictor variables in R's Random
Forest implementation. Might someone be able to suggest an elegant way
to do th
Thanks it's the same thread I've been looking at
But it's not answering to my questions…
--
View this message in context:
http://r.789695.n4.nabble.com/decimal-separator-from-comma-to-dot-tp4673414p4673433.html
Sent from the R help mailing list archive at Nabble.com.
_
If I understand what you mean, just recode them.
z <- factor(letters[1:3])
z
zz <- factor(ifelse( z %in% c("a", "b"),"d" ,z))
zz
Cheers,
Bert
On Fri, Aug 9, 2013 at 7:10 AM, Claus O'Rourke wrote:
> Hello R-Help,
> I have a variable with > 32 levels and I'd like to split this into two
> variable
Hi Martin,
thank you very much for this profound answer! Your added design advice is very
helpful, too!
For the 'simple example': Sometimes I am still a little overwhelmed from a
certain setting in the code and my ideas how I want to handle a process. But I
learn from session to session. In f
... or if you want to keep the unchanged levels the same:
zz <- factor(ifelse( z %in% c("a", "b"),"d" ,levels(z)[z]))
-- Bert
On Fri, Aug 9, 2013 at 7:35 AM, Bert Gunter wrote:
> If I understand what you mean, just recode them.
>
> z <- factor(letters[1:3])
> z
> zz <- factor(ifelse( z %in% c("
Jan,
Many thanks for your suggestion! The code runs perfectly fine on the test set.
Applying it to the complete data set, however, results in the following error:
> while (TRUE) {
+ lines <- readLines(con, encoding='LATIN1')
+ if (length(lines) == 0) break
+
Simon:
Have a look at the "proto" package for which there is a vignette. You
may find it suitable for your needs and less intimidating.
Cheers,
Bert
On Fri, Aug 9, 2013 at 7:40 AM, Simon Zehnder wrote:
> Hi Martin,
>
> thank you very much for this profound answer! Your added design advice is
>
Hi Bert,
thank you very much for your suggestion! I will take a look at it soon!
Best
Simon
On Aug 9, 2013, at 4:45 PM, Bert Gunter wrote:
> Simon:
>
> Have a look at the "proto" package for which there is a vignette. You
> may find it suitable for your needs and less intimidating.
>
> Chee
On 08/09/2013 07:45 AM, Bert Gunter wrote:
Simon:
Have a look at the "proto" package for which there is a vignette. You
may find it suitable for your needs and less intimidating.
Won't help much with S4, though! Some answers here
http://stackoverflow.com/questions/5437238/which-packages-make-
Hi Martin,
is proto in S3?
I will take a look first at the simple package EBImage.
Thank you very much for the suggestions!
Best
Simon
On Aug 9, 2013, at 5:01 PM, Martin Morgan wrote:
> On 08/09/2013 07:45 AM, Bert Gunter wrote:
>> Simon:
>>
>> Have a look at the "proto" package for whi
plz
solve this question and send me commands..
this is a question for diallel analysis(Haymann approach)..
file is attached*...
*
thanks*
*
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the po
Thanks Bert. I guess I was just wondering if there was a way to create
the new factors automatically without me having to hard code the level
names manually in my R code.
Rgds
Claus
On Fri, Aug 9, 2013 at 3:42 PM, Bert Gunter wrote:
> ... or if you want to keep the unchanged levels the same:
>
On Fri, Aug 09, 2013 at 12:33:44PM +0100, Jenny Williams wrote:
> To update on the use of this little string, I am trying to use it to automate
> files to be loaded into a raster stack.
> I think the issue I have with the string is related to the backslashes. I
> need to just read the pure text s
Dear R users,
i am trying to get a package compatible with the R CMD check routine but
I get errors like this:
Missing link(s) in documentation object ‘/.Rd’:
‘ssa’
In the respective file I have put:
##seealso<<
##\code{\link[Rssa:ssa]{ssa}}
Rssa is the package containing the ssa function
Thanks much to both Peter and Rui,
I am afraid that after 5 years with R I am still not able to understand
your method Peter. Will stick with Rui's method for now...
Alex
On 08/09/2013 04:00 PM, peter dalgaard wrote:
On Aug 9, 2013, at 13:26 , Rui Barradas wrote:
Hello,
Maybe the following
What happens when you type?
test.2 <- stack(individual.proj)
assuming you want all six or
test.2 <- stack(individual.proj[c(1,3, 5)])
to combine the 1st, 3rd, and 5th.
Eg. Modified from the stack help page
fn <- system.file("external/test.grd", package="raster")
nfn <- c(fn, fn, fn)
s <- stac
Marta Lomas hotmail.com> writes:
>
> Hello!
> I am new in the mailing list for R help and I hope to be able to
> formulate a good question easy to understand.
We hope so too :-)
[snip]
I will take a first crack at this here, but follow-ups should
probably be redirected to the r-sig-mi
On Aug 9, 2013, at 18:24 , Alex van der Spek wrote:
> Thanks much to both Peter and Rui,
>
> I am afraid that after 5 years with R I am still not able to understand your
> method Peter. Will stick with Rui's method for now...
>
Oh, come on! How about reading the first case in example(Reduce)?
On Aug 9, 2013, at 7:31 AM, maxbre wrote:
> Thanks it's the same thread I've been looking at
> But it's not answering to my questions…
Please do read the Posting Guide. You are asked to include context. In this
case including the citation to the Archive-stored code would have been
courteous a
Please read the proto vignette before asking further questions about
it. It is an alternative to/version of OOP different from S3 and S4.
-- Bert
On Fri, Aug 9, 2013 at 8:13 AM, Simon Zehnder wrote:
> Hi Martin,
>
> is proto in S3?
>
> I will take a look first at the simple package EBImage.
>
>
Hi all,
I used strptime() to convert character strings to time and did some
subtraction calculation.
a<-'2012-07-17T07:50'
b<-'2012-08-27T09:30'
strptime(a,format='%Y-%m-%dT%H:%M')-strptime(b,format='%Y-%m-%dT%H:%M')
The result shows
Time difference of -41.06944 days.
However when these opera
?difftime
> difftime(strptime(a,format='%Y-%m-%dT%H:%M'),
strptime(b,format='%Y-%m-%dT%H:%M'))
Time difference of -41.06944 days
> difftime(strptime(a,format='%Y-%m-%dT%H:%M'),
strptime(b,format='%Y-%m-%dT%H:%M'), units = 'hours')
Time difference of -985.6667 hours
>
On Fri, Aug 9, 2013 at 1:37
On Aug 9, 2013, at 10:37 AM, Jun Shen wrote:
> Hi all,
>
> I used strptime() to convert character strings to time and did some
> subtraction calculation.
>
> a<-'2012-07-17T07:50'
> b<-'2012-08-27T09:30'
>
> strptime(a,format='%Y-%m-%dT%H:%M')-strptime(b,format='%Y-%m-%dT%H:%M')
>
> The resul
Thanks Jim and David,
The difftime() is exactly what I am looking for. Just out of curiosity why
the unit of output is different. here is an example of the dataframe.
test<-structure(list(SPDTC = c("2012-08-27T09:30", "2012-08-06T10:08",
"2012-08-13T07:41", "2012-07-17T07:50", "2012-09-11T10:29")
Actually, I think it's pretty trivial if you do it in a smarter way
than I previously suggested. I found this by reading ?levels (RTFM,
Bert!)
> z <- factor(letters[1:3])
> levels(z)[1:2]<- "d" ## no hardcoding names; just use indices
> z
[1] d d c
Levels: d c
Cheers,
Bert
On Fri, Aug 9, 2013 at
Hi,
I am using flexmix to model some data which is modelled with linear
regressions. I have results obtained along the lines of that shown below, and
can retreive component parameters, but I cannot find a way or retrieving the
variance of the sigma (variance of the normal model) can anyone a
Hello -
I have been using GLMNET of the following form to predict multinomial logistic
/ class dependent variables:
mglmnet=glmnet(xxb,yb ,alpha=ty,dfmax=dfm,
family="multinomial",standardize=FALSE)
I am using both continuous and categorical variables as predictors, and am
using sparse.model.
thanks david
very humbly I'm asking you and all r-help users to forgive me about
violating the rules of this great mailing list, I didn't meant to do that: I
simply slipped into that, sorry again!
...and what about the case of many variables to be changed at the same time?
seriously, I do not wan
On Aug 9, 2013, at 11:58 AM, maxbre wrote:
> thanks david
> very humbly I'm asking you and all r-help users to forgive me about
> violating the rules of this great mailing list, I didn't meant to do that: I
> simply slipped into that, sorry again!
>
> ...and what about the case of many variables
Hi,
On Fri, Aug 9, 2013 at 6:44 AM, Kevin Shaney wrote:
>
> Hello -
>
> I have been using GLMNET of the following form to predict multinomial
> logistic / class dependent variables:
>
> mglmnet=glmnet(xxb,yb ,alpha=ty,dfmax=dfm,
> family="multinomial",standardize=FALSE)
>
> I am using both conti
Christian,
In my original example I had an n=1E5 argument in readLines:
lines <- readLines(con, n=1E5)
This ensures that every iteration of the loop only 10 lines are read
(which should usually fit into memory). Without this argument readLines
tries to read in the complete file.
Jan
O
On Aug 9, 2013, at 6:44 AM, Kevin Shaney wrote:
>
> Hello -
>
> I have been using GLMNET of the following form to predict multinomial
> logistic / class dependent variables:
>
> mglmnet=glmnet(xxb,yb ,alpha=ty,dfmax=dfm,
> family="multinomial",standardize=FALSE)
>
> I am using both continuou
On Fri, 09 Aug 2013, Manta writes:
> Dear all,
>
> I have a problem which I'm not to fix. I have the following two series:
>
> a=structure(c(33242.5196150509, 34905.8434338503, 38490.6957848689,
> 38747.0287172129, 38919.1028597142, 39026.3956586941, 38705.5344288997,
> 38545.6274379387, 38651.
This is my reproducible example
df<-structure(list(IDANT = c(37837L, 37838L, 37839L, 37840L, 37841L,
37842L, 37843L, 40720L, 40721L, 40722L), N_TX = c(6L, 6L, 6L,
4L, 1L, 1L, 1L, 2L, 2L, 1L), TILT = c(0L, 0L, 0L, 0L, 6L, 6L,
6L, 0L, 0L, 0L), DIREZIONE = c(50L, 220L, 110L, 50L, 220L, 110L,
50L,
Not sure if this what you were recommending that I do, but based on what I saw
in figures 8.4 and 8.5, I was able to combine the yscale.components.log10ticks
function definition with that of yscale.components.logpower into my own custom
function:
###default .log10ticks:
> yscale.components.log1
Hello,
To change several columns you can use lapply. In what follows, idx is
the vector of column numbers, corresponding to the columns you want to
change:
idx <- 6 # column numbers
df[idx] <- lapply(df[idx], function(x) as.numeric(sub(",", ".",
as.character(x
# check the result
str(
The Details section of the help page for difftime explains why.
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
On 8/9/13 11:02 AM, "Jun Shen" wrote:
>Thanks Jim and David,
>
>The difftime() is exactly what I am looking for. Ju
On Aug 9, 2013, at 12:50 PM, Taylor, Sean D wrote:
> Not sure if this what you were recommending that I do, but based on what I
> saw in figures 8.4 and 8.5, I was able to combine the
> yscale.components.log10ticks function definition with that of
> yscale.components.logpower into my own custo
YES, THANK YOU ALL
for the good lessons learned both about the netiquette of this mailing
list and the R coding
max
> Hi,
> Try:
> df$POT2_TX<- df$POT_TX
> df[,6:7]<- lapply(df[,6:7],function(x)
> as.numeric(as.character(sub(",",".",x
> str(df)
> #'data.frame': 10 obs. of 7 variables:
>
Hi R helpers,
I know there are packages RODBC and RJDBC to enable R to access ODBC and JDBC
data. Is there a package/software to do the reverse way: calling R from ODBC
or JDBC? Thank you.
Regards,
Yan
[[alternative HTML version deleted]]
_
The printed view of a difftime object is not necessarily reflective of its
internal representation. Also, to avoid unpleasant surprises always use a
conversion function with specified units (not "auto") if you want to convert
between numeric and difftime.
Hi,
Try:
df$POT2_TX<- df$POT_TX
df[,6:7]<- lapply(df[,6:7],function(x) as.numeric(as.character(sub(",",".",x
str(df)
#'data.frame': 10 obs. of 7 variables:
# $ IDANT : int 37837 37838 37839 37840 37841 37842 37843 40720 40721 40722
# $ N_TX : int 6 6 6 4 1 1 1 2 2 1
# $ TILT
For archiving reasons:
1. "Practical Regression and Anova using R" by Faraway
2. Possible reason: multi-collinearity in predictor variables.
Thanks everybody!
On Thu, Aug 8, 2013 at 1:43 PM, Stathis Kamperis wrote:
> Hi everyone,
>
> I have a response variable 'y' and several predictor variable
Thanks! I tried doing the type.multinomial="grouped" argument - but it didn't
work for me. Maybe I did something wrong. I thought I understood why it
didn't work because of sparse.model.matrix recoding variables (like below to
V12 & V13} makes GLMNET unable to tell that they actually came fro
On Aug 9, 2013, at 12:52 PM, kevin.shaney wrote:
> Thanks! I tried doing the type.multinomial="grouped" argument - but it
> didn't work for me. Maybe I did something wrong. I thought I understood why
> it didn't work because of sparse.model.matrix recoding variables (like below
> to V12 & V
Dear Jannis,
I think you want \link[package]{function} instead of
\link[package:function]{function}
\link[Rssa]{ssa}
Best regards,
Thierry
Van: r-help-boun...@r-project.org [r-help-boun...@r-project.org] namens Jannis
[bt_jan...@yahoo.de]
Verzonden: vr
Hi,
I am plotting some labels that consist of strings in which
some words (but only some) should be in italics.
E.g.
"M3: Homo, 5 areas, 2 areas max"
"M4: Pan, 3 areas, 2 areas max"
I am putting these on the plot with the text() command. The
words "Homo" and "Pan" should be italicized, si
Hi,
May be this gets you started:
plot(1,1,xlim=0:1,ylim=0:1)
text(0.6,0.8, expression(M3:~italic(Homo)~paste(",", " 5 areas, 2 areas
max",sep="")))
text(0.6,0.4, expression(M4:~italic(Pan)~paste(",", " 3 areas, 2 areas
max",sep="")))
A.K.
- Original Message -
From: Nick Matzke
To: R
On Aug 9, 2013, at 7:22 PM, arun wrote:
> Hi,
> May be this gets you started:
>
> plot(1,1,xlim=0:1,ylim=0:1)
> text(0.6,0.8, expression(M3:~italic(Homo)~paste(",", " 5 areas, 2 areas
> max",sep="")))
> text(0.6,0.4, expression(M4:~italic(Pan)~paste(",", " 3 areas, 2 areas
> max",sep="")))
>
67 matches
Mail list logo