similar to: How to insert vertical space between lines of tables created with the R package 'tables'?

Displaying 20 results from an estimated 10000 matches similar to: "How to insert vertical space between lines of tables created with the R package 'tables'?"

2010 Dec 30
1
latex() etc.: How to nicely format a matrix for a LaTeX document?
Dear (T)eXpeRts, I try to create a LaTeX table from an R matrix for the first time. I am not sure what the "best" approach is, I just read about latex() from Hmisc (toLatex() didn't work). Consider the following minimal example: library(Hmisc) mat <- matrix(c(1,NA,3,100,10000,4), ncol = 3, byrow = TRUE) latex(mat, file = "", booktabs = TRUE, numeric.dollar = FALSE,
2010 Jan 29
1
apply function with grouped columns
I have a data set of many rows and many columns in which both the rows and the columns have associated grouping factors. Is there a way to do what 'aggregate' does but in the other dimension? The way I have been doing this is to use 'aggregate' on the data in the usual way and then rotate the result and apply 'aggregate' again. This works but is a little messy and I was
2009 Jun 17
0
vertical line in xtable
Hi everyone I have created a function that uses xtable to print table of frequencies and percentages with a heading and some sample information (the sample size and missing values). The function and example data is below. I want a vertical line that separates the results from the sample information i.e. a vertical line on the bottom of the line second from last
2010 Dec 26
1
lattice splom: how to adjust space between tick marks and tick labels?
Dear expeRts, how can I decrease the space between the tick marks and the corresponding labels in an splom? See here: library(lattice) U <- matrix(runif(4000), ncol = 8) splom(U, axis.text.cex = 0.2) # => space between the [small] tick labels and tick marks is/seems to be too large I checked ?panel.pairs but could not find an option for that. Cheers, Marius
2013 Jan 18
0
tables package: How to remove column headings and alignment issues
Dear expeRts, Here is a minimal example with the latest version of 'tables' (questions below): require(tables) saveopts <- table_options(toprule="\\toprule", midrule="\\midrule", bottomrule="\\bottomrule", titlerule="\\cmidrule(lr)", rowlabeljustification="r")#, justification="r") ## data.frame x
2004 Jan 20
2
Error: unknown identifier {|} in tabular format {|l|c|c|c|}
I've got a package I would like to send out for testing and have noticed a "problem" with the \tabular portion of the help "compiler" the code for inserting vertical lines, in the tabular environment, causes the build to choke, but not the check command. C:\>rcmd build --binary -docs=all nlsystemfit \tabular{|l|c|c|c|}{ \hline Method \tab Instruments \tab
2007 Jan 10
1
2 problems with latex.table (quantreg package) - reproducible
Dear all, When using latex.table from the quantreg package, I don't seem to be able to set table.env=FALSE: when I don't specify caption (as I think I should, when understanding the R help rightly(?)), I get an error message, and when I do so, of course I get one, as well. The funny thing is, that a table is indeed produced in the first case, so I get a nice tabular, but as I'm using
2015 Feb 03
2
Seed in 'parallel' vignette
Hi, This is most likely only a minor technicality, but I saw the following: On page 6 of the 'parallel' vignette (http://stat.ethz.ch/R-manual/R-devel/library/parallel/doc/parallel.pdf), the random-number generator "L'Ecuyer-CMRG" is said to have seed "(x_n, x_{n-1}, x_{n-2}, y_n, y_{n-1}, y_{n-2})". However, in L'Ecuyer et al. (2002), the seed is given with
2010 Dec 30
5
Why is format(10000, big.mark = "\\,") not 10\,000?
Hi, why does format(10000, big.mark = "\\,") not give me "10\,000"? How can I get this kind of "big.mark"? Cheers, Marius
2011 Apr 06
7
Quiz: Who finds the nicest form of X_1^\prime?
Dear expeRts, I would like to create a plotmath-label of the form X_1^\prime. Here is how to *not* do it [not nicely aligned symbols]: plot(0,0,main=expression(italic(X*minute[1]))) plot(0,0,main=expression(italic(X[1]*minute))) plot(0,0,main=expression(italic(X)[1]*minute)) Any suggestions? Cheers, Marius
2011 Jul 08
1
lattice: How to vertically adjust an axis label?
Dear expeRts, How can I vertically adjust an axis tick label so that it is nicely aligned with the other labels? library(lattice) xyplot(0~0, xlim=c(0,3), scales=list(x=list(at=c(1,1.1), labels=c(expression(hat(theta)[italic(n)]),expression(theta))))) ## aim: move the leftmost expression up so that theta is nicely aligned with the second theta. Cheers, Marius
2016 May 05
4
R process killed when allocating too large matrix (Mac OS X)
Hi Simon, thanks for your quick reply. 1) ... so you can reproduce this? 2) Do you know a way how this can be 'foreseen'? We allocate larger matrices in the copula package depending on the user's input dimension. It would be good to tell her/him "Your dimension is quite large. Be aware of killers in your neighborhood"... before the killer attacks. Thanks & cheers,
2012 Dec 08
5
How to efficiently compare each row in a matrix with each row in another matrix?
Dear expeRts, I have two matrices A and B. They have the same number of columns but possibly different number of rows. I would like to compare each row of A with each row of B and check whether all entries in a row of A are less than or equal to all entries in a row of B. Here is a minimal working example: A <- rbind(matrix(1:4, ncol=2, byrow=TRUE), c(6, 2)) # (3, 2) matrix B <-
2013 Apr 19
2
tables package - error message of "duplicate values"
Dear expeRts! when I try summarize data using "tabular" of tables package.. here is an example.. > a <- data.frame(a=rep(10,10),b=round(runif(10,10,20)),c=round(runif(10,40,50))) > a a b c 1 10 14 44 2 10 17 40 3 10 13 40 4 10 18 40 5 10 11 49 6 10 16 46 7 10 15 43 8 10 19 49 9 10 19 49 10 10 13 45 > tabular((a+1)~(n=1)+Format(dig=0)*(b + c) * (mean +
2012 Mar 01
2
How to colorize the panel backgrounds of pairs()?
Dear expeRts, I would like to colorize the backgrounds of a pairs plot according to the respective panel number. Here is what I tried (without success): count <- 0 mypanel <- function(x, y, ...){ count <<- count+1 bg. <- if(count %in% c(1,4,9,12)) "#FDFF65" else NA points(x, y, cex=0.5, bg=bg) } U <- matrix(runif(4*500), ncol=4) pairs(U, panel=mypanel) I
2011 Apr 18
4
splom, plotmath: how to add three lines of information with alignment?
Dear expeRts, I would like to create a scatter plot matrix with splom(). The lower panel should contain some additional information about the samples shown in the upper panel plot, see the splom() call below. Now two questions came up: (1) The lower panels show "tau" and "alpha" on top of each other. How can I plot *three* expressions on top of each other? I tried several
2011 Mar 03
1
lattice: How to increase space between ticks and labels of z-axis?
Dear expeRts, How can I increase the space between the ticks and the labels in the wireframe plot below? I tried some variations with par.settings=list(..) but it just didn't work. Many thanks, Marius library(lattice) u <- seq(0, 1, length.out=20) grid <- expand.grid(x=u, y=u) z <- apply(grid, 1, function(x) 1/(x[1]*x[2]+0.0001)) wireframe(z~grid[,1]*grid[,2], aspect=1,
2013 Apr 23
2
Tables package - remove NAs and NaN
Dear Rxperts, q <- data.frame(p=rep(c("A","B"),each=10,len=30), a=rep(c(1,2,3),each=10),id=seq(30), b=round(runif(30,10,20)), c=round(runif(30,40,70))) The operation below... tabular(((p=factor(p))*(a=factor(a))+1) ~ (N = 1) + (b + c)* (mean+sd),data=q) yields some rows of NAs and NaN as shown below b c p a N mean sd mean sd A 1 10
2014 Aug 22
3
parallel::detectCores(TRUE) gives: Error in system(cmd, TRUE) : error in running command
Hi, Both under the current R-devel (r66456) and a version from about 3 months ago, I experience the following behavior: > parallel::detectCores(TRUE) Error in system(cmd, TRUE) : error in running command > traceback() 3: system(cmd, TRUE) 2: gsub("^ +", "", system(cmd, TRUE)[1]) 1: parallel::detectCores(TRUE) > This is on Ubuntu 14.04. Does anybody else see this? [I
2016 May 05
1
R process killed when allocating too large matrix (Mac OS X)
Hi, Interesting "feature" in 10.11.4. I wonder if the process is killed before or after malloc() returns. If before, it seems very blunt: "You're asking too much and I don't like it so I kill you now". If after it doesn't look much better: "You're asking a lot and I don't like it but I give it to you anyway. I'll kill you quickly later". Why