Re: [R] Increasing space for main title in a lattice (xyplot()) graphics.

2020-02-12 Thread Deepayan Sarkar
Hi Bert, You are right that the general solution is for 'main' to be a (grid) grob. It is not clear (to me) what the "height" of a textGrob with multiple labels should be, but the following gives reasonable results: xyplot(1 ~ 1, main = textGrob(c("The quick brown fox jumped", "over the

Re: [R] Increasing space for main title in a lattice (xyplot()) graphics.

2020-02-12 Thread Bert Gunter
OK. Now for a tougher problem: how to make the first line bold font and the second line normal font (and/or different colors)? My reading of the docs did not reveal how to do it, but I found a way using a textGrob for the title (i.e. main ). But it's tricky, as the "obvious solution" of using

Re: [R] Increasing space for main title in a lattice (xyplot()) graphics.

2020-02-12 Thread Deepayan Sarkar
On Thu, Feb 13, 2020 at 10:39 AM Richard M. Heiberger wrote: > > It works as anticipated for me > > > xyplot(1 ~ 1, > + main="The quick brown fox jumped\n over the lazy dog.") > > xyplot(1 ~ 1, > + main="The quick brown fox jumped over the lazy dog.") > > Something else

Re: [R] Increasing space for main title in a lattice (xyplot()) graphics.

2020-02-12 Thread Richard M. Heiberger
It works as anticipated for me > xyplot(1 ~ 1, + main="The quick brown fox jumped\n over the lazy dog.") > xyplot(1 ~ 1, + main="The quick brown fox jumped over the lazy dog.") Something else you are doing is probably causing the difficulty. Rich On Wed, Feb 12, 2020 at

[R] Increasing space for main title in a lattice (xyplot()) graphics.

2020-02-12 Thread Rolf Turner
I'm trying to do an xyplot() with a longish main title that I'd like to split into two lines, something like xyplot(, main="The quick brown fox jumped\n over the lazy dog.") When I do this I only get the last half, i.e. the "over the lazy dog." bit, and the first half doesn't

Re: [R] make check fails -- how to debug

2020-02-12 Thread Duncan Murdoch
On 12/02/2020 4:42 p.m., Ivan Krylov wrote: On Wed, 12 Feb 2020 19:32:34 + "Barris, Wes" wrote: I'm only trying to install the latest version on our servers for our users. Are you allowed to use EPEL? This seems to be the officialy supported way of installing latest R on CentOS [1]. It

Re: [R] Aggregate individual level data to age categories

2020-02-12 Thread stefan.d...@gmail.com
Thank you! This is exactly what I was looking for! Cheers! On Wed, Feb 12, 2020 at 11:29 PM Jim Lemon wrote: > > Hi Stefan, > How about this: > > sddf<-read.table(text="age x > 45 1 > 45 2 > 46 1 > 47 3 > 47 3", > header=TRUE) > library(prettyR) > sdtab<-xtab(age~x,sddf) >

Re: [R] Aggregate individual level data to age categories

2020-02-12 Thread Jim Lemon
Hi Stefan, How about this: sddf<-read.table(text="age x 45 1 45 2 46 1 47 3 47 3", header=TRUE) library(prettyR) sdtab<-xtab(age~x,sddf) sdtab$counts Jim On Thu, Feb 13, 2020 at 7:40 AM stefan.d...@gmail.com wrote: > > Dear All, > > I have a seemingly standard problem to which I

Re: [R] Aggregate individual level data to age categories

2020-02-12 Thread stefan.d...@gmail.com
Thank you, this is already very helpful. But how do I get it in the form age var_x=1 var_x=2 var_x=3 45 1 1 0 46 1 00 So it would be a data frame with 4 variables. Cheers! On Wed, Feb 12, 2020 at 10:25 PM William Dunlap wrote: > >

Re: [R] make check fails -- how to debug

2020-02-12 Thread Ivan Krylov
On Wed, 12 Feb 2020 19:32:34 + "Barris, Wes" wrote: > I'm only trying to install the latest version on our servers for our > users. Are you allowed to use EPEL? This seems to be the officialy supported way of installing latest R on CentOS [1]. It might be a good idea to ask in R-SIG-Fedora

Re: [R] Aggregate individual level data to age categories

2020-02-12 Thread William Dunlap via R-help
You didn't say how you wanted to use it as a data.frame, but here is one way d <- data.frame( check.names = FALSE, age = c(45L, 45L, 46L, 47L, 47L), x = c(1L, 2L, 1L, 3L, 3L)) with(d, as.data.frame(table(age,x))) which gives: age x Freq 1 45 11 2 46 11 3 47 10 4 45

Re: [R] Aggregate individual level data to age categories

2020-02-12 Thread stefan.d...@gmail.com
well, if I think about, its actually a simple frequency table grouped by age. but it should be usable a matrix or data frame. On Wed, Feb 12, 2020 at 9:48 PM wrote: > > So a pivot table? > > On 12 Feb 2020 20:39, stefan.d...@gmail.com wrote: > > Dear All, > > I have a seemingly standard problem

[R] Aggregate individual level data to age categories

2020-02-12 Thread stefan.d...@gmail.com
Dear All, I have a seemingly standard problem to which I somehow I do not find a simple solution. I have individual level data where x is a categorical variable with 3 categories which I would like to aggregate by age. age x 45 1 45 2 46 1 47 3 47 3 and so on. It should after

Re: [R] make check fails -- how to debug

2020-02-12 Thread Barris, Wes
Thanks Ivan. I would like to manually run the test you mentioned but I don't know how. I'm not an R user. I'm only trying to install the latest version on our servers for our users. Is this what I need to type? > pwd /usr/local/src/stats/R-3.6.2/CentOS ./bin/R CMD ../tests/Pkgs/exSexpr

Re: [R] make check fails -- how to debug

2020-02-12 Thread Ivan Krylov
On Wed, 12 Feb 2020 14:20:55 + "Barris, Wes" wrote: > I'm not sure exactly what part of this is the fatal error: One of the tests is building the package contained in tests/Pkgs/exSexpr. For some reason, R CMD build failed to produce a tarball for this package. Try running it yourself and

Re: [R-es] Añadir leyenda a un gráfico con eje secundario en ggplot

2020-02-12 Thread Álvaro Hernández Vicente
Hola, Raúl: Lo de poner las líneas correspondientes lo tienes ya, solo que has escrito "nueva" en lugar de "actual" que es como has llamado a esa variable. Y si quieres poner una leyenda para el color de la línea lo puedes hacer de dos formas: pasando el data.frame a formato largo ("actual" y

Re: [R] make check fails -- how to debug

2020-02-12 Thread Barris, Wes
Thanks Ivan. Here is the contents of reg-packages.Rout.fail. I'm not sure exactly what part of this is the fatal error: R version 3.6.2 (2019-12-12) -- "Dark and Stormy Night" Copyright (C) 2019 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free

[R] Course: Zero-inflated models using R-INLA

2020-02-12 Thread Highland Statistics Ltd
We would like to announce the following statistics course. Course: Introduction to zero-inflated models using R-INLA Where and when: NAIT, Edmonton, Canada. 23 - 26 March 2020 Course website: http://highstat.com/index.php/courses-upcoming Course flyer:

Re: [R] make check fails -- how to debug

2020-02-12 Thread Ivan Krylov
On Tue, 11 Feb 2020 21:26:33 + "Barris, Wes" wrote: > running code in '../../tests/reg-packages.R' ...make[3]: *** > [reg-packages.Rout] Error 1 tests/Makefile.common has the following in the .R.Rout rule: @$(ECHO) $(ECHO_N) "running code in '$<' ...$(ECHO_C)" > $@.log

Re: [R] make check fails -- how to debug

2020-02-12 Thread Duncan Murdoch
On 11/02/2020 4:26 p.m., Barris, Wes wrote: I am trying to build R-3.6.2 on a Linux system running CentOS 7.7.1908. "make check" fails. How can I troubleshoot this to find out what is wrong? R_PAPERSIZE=letter cd R-3.6.2 mkdir CentOS ../configure --with-x=no --enable-R-shlib make make check