Às 15:36 de 11/08/2024, Steven Yen escreveu:
Thanks. Will try it.
Have not tried it but I think the following may work:
out$results<-NULL
out$results$ei<-ap
out$results$vi<-vap
All I need is printing by returning out (unless I turn it off). And,
retrieve ap and vap as needed as shown above.
Just for reference, R's "preferred" way to handle printing is to
create "classed" objects from a function that produces all the
necessary information and have an appropriate "print" method, i.e.
function, for that class to print it. R has several class object
systems that can do this, including the
В Sun, 11 Aug 2024 22:36:08 +0800
Steven Yen пишет:
> All I need is printing by returning out (unless I turn it off). And,
> retrieve ap and vap as needed as shown above. Guess I need to read
> more about invisible.
Perhaps you could print(out) instead of returning it in the if
(printing) branc
Thanks. Will try it.
Have not tried it but I think the following may work:
out$results<-NULL
out$results$ei<-ap
out$results$vi<-vap
All I need is printing by returning out (unless I turn it off). And,
retrieve ap and vap as needed as shown above. Guess I need to read more
about invisible.
Às 09:51 de 11/08/2024, Steven Yen escreveu:
Hi
In the following codes, I had to choose between printing (= TRUE) or
deliver something for grab (ei, vi). Is there a way to get both--that
is, to print and also have ei and vi for grab? Thanks.
Steven
...
out<-round(as.data.frame(cbind(ap,se,
Read ?print.data.frame. There is an argument for that.
On March 27, 2023 10:05:10 AM PDT, Dennis Fisher wrote:
>R 4.2.3
>OS X
>
>Colleagues,
>
>I am printing a large number of tables using the print command. A simple
>example is:
> print(data.frame(COL1=1:5, COL2=10:6))
>
>The result in t
Try:
print(data.frame(COL1=1:5, COL2=10:6), row.names=FALSE)
-Original Message-
From: R-help On Behalf Of Dennis Fisher
Sent: Monday, March 27, 2023 1:05 PM
To: r-help@r-project.org
Subject: [R] printing a data.frame without row numbers
R 4.2.3
OS X
Colleagues,
I am printing a large
print(data.frame(COL1=1:5, COL2=10:6), row.names=FALSE)
On 27/03/2023 1:05 p.m., Dennis Fisher wrote:
R 4.2.3
OS X
Colleagues,
I am printing a large number of tables using the print command. A simple
example is:
print(data.frame(COL1=1:5, COL2=10:6))
The result in this case is:
Às 10:15 de 16/01/2023, Martin Maechler escreveu:
Rui Barradas
on Mon, 16 Jan 2023 08:46:43 + writes:
> Às 08:31 de 16/01/2023, Jeff Newmiller escreveu:
>> Use the Cairo PDF device?
>>
>> On January 16, 2023 12:18:48 AM PST, Dennis Fisher
>> wrote:
>>> R
> Rui Barradas
> on Mon, 16 Jan 2023 08:46:43 + writes:
> Às 08:31 de 16/01/2023, Jeff Newmiller escreveu:
>> Use the Cairo PDF device?
>>
>> On January 16, 2023 12:18:48 AM PST, Dennis Fisher
>> wrote:
>>> R 4.2.2 OS X
>>>
>>> Colleagues
>>>
Hallo Dennis
Is the STRING in R still containing **≥** character?
Or it was converted during reading to R to ...?
What dput(STRING) result i?
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of Dennis Fisher
> Sent: Monday, January 16, 2023 9:19 AM
> To: r-help@r-project.org
Às 08:31 de 16/01/2023, Jeff Newmiller escreveu:
Use the Cairo PDF device?
On January 16, 2023 12:18:48 AM PST, Dennis Fisher wrote:
R 4.2.2
OS X
Colleagues
A file that I have read includes strings like this:
"EVENT ≥ 30 sec"
When I include the string in a graphic using:
mtex
How about just 'EVENT > 30 sec' or 'EVENT > 29 sec' ?
On Mon, Jan 16, 2023 at 10:19 AM Dennis Fisher wrote:
> R 4.2.2
> OS X
>
> Colleagues
>
> A file that I have read includes strings like this:
> "EVENT ≥ 30 sec"
> When I include the string in a graphic using:
> mtext(STRING,
Use the Cairo PDF device?
On January 16, 2023 12:18:48 AM PST, Dennis Fisher wrote:
>R 4.2.2
>OS X
>
>Colleagues
>
>A file that I have read includes strings like this:
> "EVENT ≥ 30 sec"
>When I include the string in a graphic using:
> mtext(STRING, …)
>it appears as:
> "EVENT .
Dear Rui,
Many thanks...
Yours
Akshay M Kulkarni
From: Rui Barradas
Sent: Sunday, July 10, 2022 12:39 AM
To: akshay kulkarni ; R help Mailing list
Subject: Re: [R] printing with bothe print and cat...
Hello,
Like this?
testprint <- function() {
for(i
Hello,
Like this?
testprint <- function() {
for(i in 1:5) {
for(j in 1:5) {
cat(j, "")
}
cat("\t", i, "\n")
}
}
testprint()
#> 1 2 3 4 5 1
#> 1 2 3 4 5 2
#> 1 2 3 4 5 3
#> 1 2 3 4 5 4
#> 1 2 3 4 5 5
Hope this helps,
Rui Barradas
Às 17:46 de 09/07/2
Dear Tim,
Many thanks...
Yours sincerely
AKSHAYM KULKARNI
From: Ebert,Timothy Aaron
Sent: Saturday, July 9, 2022 11:03 PM
To: akshay kulkarni ; David Winsemius
Cc: R help Mailing list
Subject: RE: [R] printing with bothe print and cat
Dear David,
Thanks ...
Yours sinecrely,
AKSHAY M KULKARNI
From: David Winsemius
Sent: Saturday, July 9, 2022 10:30 PM
To: akshay kulkarni
Cc: R help Mailing list
Subject: Re: [R] printing with bothe print and cat...
If spaces needed. In
If spaces needed. In first sequences then
paste( 1:5, collapse=“ “)
Sent from my iPhone
> On Jul 9, 2022, at 9:59 AM, David Winsemius wrote:
>
> Skip the for loops:
>
> cat(paste( seq(1:5), ““, 1:5) )
>
> —
> David
>
> Sent from my iPhone
>
>> On Jul 9, 2022, at 9:47 AM, akshay kulk
Skip the for loops:
cat(paste( seq(1:5), ““, 1:5) )
—
David
Sent from my iPhone
> On Jul 9, 2022, at 9:47 AM, akshay kulkarni wrote:
>
> Dear members,
> I have the following code:
>
> testprint <- function() {
>
> for(i in 1:5) {for(j in 1:5)
> {cat(j)}
>
M
To: Stefan Evert
Cc: R-help Mailing List
Subject: Re: [R] Printing upon calling a function
No. I wrote the function so I am sure no "invisible" command was used.
Strangely enough, compiling the function isto part of a package, results were
NOT printed. Yes if I call the function d
On 30/11/2020 11:51 a.m., Steven Yen wrote:
Thanks to all. Presenting a large-scale, replicable example can be a
burden to the READERs which was why I was reluctant.
You shouldn't post a large scale reproducible example, you should
simplify it to just the essentials. Often in doing that you w
t
Subject: Re: [R] Printing upon calling a function
Thanks. I know, my point was on why I get something printed by simply doing
line 1 below and at other occasions had to do line 2.
me.probit(obj)
v<-me.probit(obj); v
On 2020/11/30 下午 05:33, Jim Lemon wrote:
> Hi Steven,
> You seem
Thanks to all. Presenting a large-scale, replicable example can be a
burden to the READERs which was why I was reluctant.
I am embarrassed to report that after having to restart Windows after
the system hang on something unrelated, the issue was resolved and
printing was normal. I bet it had n
By not posting a reproducible example, you're wasting everyone's time.
Duncan Murdoch
On 30/11/2020 6:06 a.m., Steven Yen wrote:
No, sorry. Line 1 below did not print for me and I had to go around and
do line 2 to print:
me.probit(obj)
v<-me.probit(obj); v
A puzzle.
On 2020/11/30 下午 07:0
No, sorry. Line 1 below did not print for me and I had to go around and
do line 2 to print:
me.probit(obj)
v<-me.probit(obj); v
A puzzle.
On 2020/11/30 下午 07:00, Duncan Murdoch wrote:
On 30/11/2020 5:41 a.m., Stefan Evert wrote:
On 30 Nov 2020, at 10:41, Steven Yen wrote:
Thanks. I kno
On 30/11/2020 5:41 a.m., Stefan Evert wrote:
On 30 Nov 2020, at 10:41, Steven Yen wrote:
Thanks. I know, my point was on why I get something printed by simply doing
line 1 below and at other occasions had to do line 2.
me.probit(obj)
That means the return value of me.probit() has been mar
No. I wrote the function so I am sure no "invisible" command was used.
Strangely enough, compiling the function isto part of a package, results
were NOT printed. Yes if I call the function during run, by preceding
the call with a line that attach the source code:
source("A:/.../R/oprobit.R")
> On 30 Nov 2020, at 10:41, Steven Yen wrote:
>
> Thanks. I know, my point was on why I get something printed by simply doing
> line 1 below and at other occasions had to do line 2.
>
> me.probit(obj)
That means the return value of me.probit() has been marked as invisible, so it
won't auto-
Thanks. I know, my point was on why I get something printed by simply
doing line 1 below and at other occasions had to do line 2.
me.probit(obj)
v<-me.probit(obj); v
On 2020/11/30 下午 05:33, Jim Lemon wrote:
Hi Steven,
You seem to be assigning the result of me.oprobit(obj) to v instead of
prin
Hi Steven,
You seem to be assigning the result of me.oprobit(obj) to v instead of
printing it. By appending ";v" tp that command line, you implicitly
call "print".
Jim
On Mon, Nov 30, 2020 at 7:15 PM Steven Yen wrote:
>
> I hope I can get away without presenting a replicable set of codes
> becau
Answering you is also a burden without the reprodicible code. I'll pass on that.
But I will say that mixing analysis with output in the same function is a
terrible habit. Come to the functional side of coding... it is much more
re-usable here.
On November 30, 2020 12:14:35 AM PST, Steven Yen w
Thank you Lei. I incorporate Bill Dunlap's idea of flagging with FORTRAN
stars when field width is short. It works great and serves what I need.
Thank you all.
I love R!
Steven
Linus Chen 於 2019/7/23 下午 05:46 寫道:
Dear Steven,
The function "write()" has a parameter "columns".
And sprint() ca
Very nice indeed. Thank you gentlemen.
Steven
Michael Friendly 於 2019/7/24 上午 01:23 寫道:
Nice to see William Dunlap take the trouble to mimic the classic
Fortran behavior of printing for numbers that don't fit in the
given width :)
-Michael
On 7/22/19 6:33 p.m., William Dunlap via R-hel
Nice to see William Dunlap take the trouble to mimic the classic Fortran
behavior of printing for numbers that don't fit in the given width :)
-Michael
On 7/22/19 6:33 p.m., William Dunlap via R-help wrote:
The following mimics Fortran printing with format
F..
print1 <- function (x, perL
Thank you, Gentlemen. That serves my need. Bill's routine is great.
Also, Rui: Is there a way to get rid of the filled "NA" and use space
instead. Using fill = "" does not help either; it causes all numbers to
be embraced with quotations. Finally, I have no idea why Rui's message
did not reach
Dear Steven,
The function "write()" has a parameter "columns".
And sprint() can do do some formatting in C style.
x <- rnorm(100)
s <- sprintf( fmt="%8.2f" ,x )
write(s, file="", ncolumns=7L)
Cheers,
Lei
On Mon, 22 Jul 2019 at 07:37, Steven wrote:
>
> Is there a convenient way to print a vect
Hello,
How could I forgot na.print? Thanks, Bill.
This version c no longer has an argument fill and it's the one that
behaves more like the OP asks for so far.
print0c <- function(x, len = 10, digits = 2){
n <- length(x)
x <- round(x, digits = digits)
fill <- NA
m <- n %/% len
remai
By the way, the default print method has the argument 'na.print' that can
speciify how to print an NA value. E.g.,
> print(c(1234/, NA, 1), na.print="n/a")
[1] 0.1234123 n/a 1.000
> print(c(1234/, NA, 1), na.print="")
[1] 0.1234123 1.000
> print(c(1234/, NA, 1)
The following mimics Fortran printing with format
F..
print1 <- function (x, perLine = 10, fWidth = 8, fPrecision = 2,
fortranStars = TRUE)
{
format <- paste0("%", fWidth, ".", fPrecision, "f")
oldWidth <- getOption("width")
on.exit(options(width = oldWidth))
options(width = perLin
Simpler, no loops:
print0b <- function(x, len = 10, digits = 2, fill = ""){
n <- length(x)
x <- round(x, digits = digits)
m <- n %/% len
remainder <- n %% len
A <- matrix(x[seq_len(len*m)], ncol = len)
if(remainder > 0){
A <- rbind(A, c(x[(len*m + 1):n], rep(fill, len*(m + 1) - n
Hello,
Maybe something like the following is what you want.
I have added an extra argument 'fill' to allow to choose what to print
in the end. It's default value is "" making the entire matrix elements
characters but it can be NA or 0.
print0 <- function(x, len = 10, digits = 2, fill = ""){
Dear All:
Below is what I meant. Procedure print0 allows me to print a vector of
length 53 in four rows of 10 plus 1 row of 3 (Ido not like the NA). This
is silly. I am hoping that there is a candid way to print the matrix.
Thank you.
Steven Yen
===
n<-53; x<-runif(n); # x<-round(x,2)
print0
Great! Thanks.
On 5/15/2019 7:00 PM, Rui Barradas wrote:
> Hello,
>
> What's wrong with
>
> test <- function(x){
> table <- matrix(x, nrow = 4)
> cat("\nTable:\n")
> print(table)
> invisible(list(table = table))
> }
>
>
> Hope this helps,
>
> Rui Barradas
>
> Às 10:33 de 15/05/19, Steven Y
Hello,
What's wrong with
test <- function(x){
table <- matrix(x, nrow = 4)
cat("\nTable:\n")
print(table)
invisible(list(table = table))
}
Hope this helps,
Rui Barradas
Às 10:33 de 15/05/19, Steven Yen escreveu:
Dear All,
I would like to get a matrix (table) printed in a procedure,
2 13 14 15 16 17 18 1920
[3,] 21 22 23 24 25
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77843-4352
-Original Message-
From: R-help On Behalf Of K. Elo
Sent: Monday, March 25, 2019 2:26 AM
To: r
Hi!
2019-03-25 kello 09:30 +0800, Steven Yen wrote:
> The second command is ugly. How can I print the 25 numbers into 2
> rows
> of ten plus a helf row of 5? Thanks.
Something like this?
x<-1:25; for (i in seq(1,length(x),10))
print(x[i:ifelse((i+9)>length(x),length(x),i+9)])
HTH,
Kimmo
_
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Michael
> Friendly
> Check out the `matlib` package on CRAN and devel on github:
Very nice! Thanks for the pointer.
Steve E
***
This
John-
Don't try to forge a new wheel, when you can get one ready made
and it might fit your wagon.
Check out the `matlib` package on CRAN and devel on github:
https://github.com/friendly/matlib
install.packages("matlib")
library(matlib)
A <- matrix(c(1,2,3, -1, 2, 1), 3, 2)
b <- c(2,1,3)
show
Steve,
Thank you,
John
John David Sorkin M.D., Ph.D.
Professor of Medicine
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology and Geriatric
Medicine
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
Don't use the default print method then. When you type an expression alone at
the console it uses a print function to convert the result to characters for
output. The default print method for matrices of character uses quotes to show
the exact contents of each character string.
Convert the matr
You can drop the quote marks by calling print() explicitly with quote=FALSE, by
using as.data.frame round your cbind, or - perhaps best - by constructing your
output matrix as a data frame in the first place. (print.data.frame defaults
to quote=FALSE). And if you suppress name checking in a dat
Thank you all - print works wonders.
On 12/22/2018 10:36 PM, Eric Berger wrote:
> Hi Steven,
> Here's one way, using print
>
> try5<-function(A,B){
> C<-A+B
> #cat("\nA =",A,"\nC = ",C)
> cat("\nA = ")
> print(A)
> cat("\nC = ")
> print(C)
> structure(list(A=A,B=B,C=C))
> }
>
> HTH,
Try using print instead of cat [1], and please read about what the arguments
are in the help file [2][3] for any function you are using before posting a
question.
[1]
https://stackoverflow.com/questions/31843662/what-is-the-difference-between-cat-and-print
[2] ?cat
[3] ?print
On December 22, 2
Hello,
Use print(A) and print(C). cat is meant for simpler objects.
Hope this helps,
Rui Barradas
Às 14:31 de 22/12/2018, Steven Yen escreveu:
How do I print a matrix running a procedure? In the code below, I print
with the cat command and get a vector (from A and C).
A<-matrix(rpois(16,lamb
Hi Steven,
Here's one way, using print
try5<-function(A,B){
C<-A+B
#cat("\nA =",A,"\nC = ",C)
cat("\nA = ")
print(A)
cat("\nC = ")
print(C)
structure(list(A=A,B=B,C=C))
}
HTH,
Eric
On Sat, Dec 22, 2018 at 4:32 PM Steven Yen wrote:
> How do I print a matrix running a procedure? I
University of New England
Armidale NSW 2350
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of David
Winsemius
Sent: Friday, 28 September 2018 04:53
To: David Disabato
Cc: r-help@r-project.org
Subject: Re: [R] Printing standard notation and scientific notation in
First compare
> format(c(0.52, 0.17, 0.03, 1e-20))
[1] "5.2e-01" "1.7e-01" "3.0e-02" "1.0e-20"
> prettyNum(c(0.52, 0.17, 0.03, 1e-20))
[1] "0.52" "0.17" "0.03" "1e-20"
>
If you want to print one column at a time, that will do what you ask. If you
want to print the entire data frame, with num
> On Sep 27, 2018, at 9:35 AM, David Disabato wrote:
>
> Hi R-help,
>
> I was wondering if it was possible for a column of a dataframe to print
> some numbers in standard notation and some in scientific notation. Say my
> column of data (i.e., dat$x) has numbers between 0 and 1 with a few numb
Duncan
Many thanks. I removed the (re-)definitions for print and print.default, and I
redefined print.data.frame using 'x' instead of 'df'.
Your point about possible issues downstream with row names is well taken. I'll
keep a lookout for any untoward side effects.
In the meantime, all is wel
On 06/06/2018 6:28 AM, zListserv wrote:
Sorry. Here's how I re-defined print, print.default, and print.data.frame:
print = function(df, ..., right=FALSE, row.names=FALSE) base::print(df, ...,
right=right, row.names=row.names)
base::print doesn't have those arguments. It only has arguments
Sorry. Here's how I re-defined print, print.default, and print.data.frame:
print = function(df, ..., right=FALSE, row.names=FALSE) base::print(df, ...,
right=right, row.names=row.names)
print.default = function(df, ..., right=FALSE, row.names=FALSE)
base::print.default(df, ..., right=right, ro
yes, thank you for catching that slip.
On Tue, Jun 5, 2018 at 11:29 PM, Christopher W. Ryan
wrote:
> Richard--
>
> Nice. If I understand your code correctly, in the line
>
> ddm <- matrix("", (n+2) %/% nc, nc)
>
> I could instead use
>
> ddm <- matrix("", (n + nc - 1) %/% nc, nc)
>
> for generali
Richard--
Nice. If I understand your code correctly, in the line
ddm <- matrix("", (n+2) %/% nc, nc)
I could instead use
ddm <- matrix("", (n + nc - 1) %/% nc, nc)
for generalizability, as I may have to increase nc as the list of words
grows ever longer.
Thanks everyone. Several good suggesti
I think this is cuter, and it is a hair faster.
n <- length(dd)
ddm <- matrix("", (n+2) %/% nc, nc)
ddm[1:n] <- dd
Rich
> system.time(for (i in 1:1) {
+ add <- nc - (length(dd) %% nc)
+ dd2 <- c(dd, rep("", add))
+ ddm <- matrix(dd2, ncol = nc)
+ })
user system elapsed
0.064 0.100
> On Jun 5, 2018, at 9:45 AM, Christopher W Ryan wrote:
>
> I'm writing code for a recurring report, using an R --> Sweave --> pdflatex
> workflow. It includes a character vector of short words that I would like
> to display compactly, in columns on a page, rather than one word per line,
> whi
On 05/06/2018 7:49 PM, zListserv wrote:
p.s. It seems to work for print command, but not for head, tail, or printing a
data frame, per below. Any way fix the others so they all left-justify?
You haven't shown us what you did.
Duncan Murdoch
__
R-
p.s. It seems to work for print command, but not for head, tail, or printing a
data frame, per below. Any way fix the others so they all left-justify?
R> x <- as.data.frame(rep(c("a", "ab", "abc"), 7))
R> print(x)
rep(c("a", "ab", "abc"), 7)
a
ab
Duncan et al
I tried to redefine print.data.frame the way you suggested, but I misplaced the
ellipsis by putting it at the end of the function definition instead of
immediately following the name of the data frame.
Works now.
Thanks!
> On 2018-06-05, at 12:39, Duncan Murdoch wrote:
>
> On
Anthropology
Texas A&M University
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Duncan Murdoch
Sent: Tuesday, June 5, 2018 11:40 AM
To: zListserv ; r-help@r-project.org
Subject: Re: [R] Printing left-justified character strings
On 05/06/2018 10:2
On 05/06/2018 10:24 AM, zListserv wrote:
Many (most?) R functions print character strings and factor labels
right-justified.
Could you be more specific? I see character strings left justified,
e.g. x <- rep(c("a", "ab", "abc"), 7) prints as
[1] "a" "ab" "abc" "a" "ab" "abc" "a"
[
Martin, I'm pretty sure the use of Matrix here (actually by someone
else than Dr Bryan) was to make an easy, inline, reproducible example.
The actual "ugh" column comes from using git2r. I'm assuming there's
an API call returning some pretty gnarly structures that are getting
shoehorned into a data
> boB Rudis
> on Tue, 12 Jan 2016 13:51:50 -0500 writes:
> I wonder if something like:
> format.list <- function(x, ...) {
> rep(class(x[[1]]), length(x))
> }
> would be sufficient? (prbly needs more 'if's though)
Dear Jenny,
for a different perspective (and a lo
I wonder if something like:
format.list <- function(x, ...) {
rep(class(x[[1]]), length(x))
}
would be sufficient? (prbly needs more 'if's though)
On Tue, Jan 12, 2016 at 12:15 PM, Jenny Bryan wrote:
> Is there a general problem with printing a data.frame when it has a
> list-column of S4 obj
Thanks a lot Sarah. I think I've got what I wanted.
On Mon, Jul 20, 2015 at 2:55 PM, Sarah Goslee wrote:
> Subsetting error. See below.
>
> On Mon, Jul 20, 2015 at 3:29 PM, gaurav kandoi wrote:
>> Hi Sarah, sorry for posting in HTML.
>>
>> I've two big matrices (5k*4k) with the same structure, i
Subsetting error. See below.
On Mon, Jul 20, 2015 at 3:29 PM, gaurav kandoi wrote:
> Hi Sarah, sorry for posting in HTML.
>
> I've two big matrices (5k*4k) with the same structure, i.e. :
>
> ,mRNA1,mRNA2,mRNA3
> lncRNA1,0.395646498,0.949950035,0.761770206
> lncRNA2,0.037909944,0.661258022,0.5586
Hi Sarah, sorry for posting in HTML.
I've two big matrices (5k*4k) with the same structure, i.e. :
,mRNA1,mRNA2,mRNA3
lncRNA1,0.395646498,0.949950035,0.761770206
lncRNA2,0.037909944,0.661258022,0.558657799
lncRNA3,0.678459646,0.652364052,0.359053653
Now, I would like to extract the names of the
Without a reproducible example, or at least a non-mangled one (please
don't post in HTML), I'm not inclined to try it, but why not use
sig_values to index row.names() and col.names() if you're after the
names?
Sarah
On Mon, Jul 20, 2015 at 1:44 PM, gaurav kandoi wrote:
> Hi All
>
> I've two big
I am not totally clear on the header question but would something like ?head
help here? It will show a certain number of rows of data with headers included
. I think the default is 6 rows but if all you want to do is check names and a
bit of data something like head(xx, 2) works nicely.
RE ou
On Tue, Dec 9, 2014 at 3:11 PM, Henrik Bengtsson wrote:
> I'm surprised no one mentioned alternatives to LaTeX, which is not
> necessarily installed on all systems and it's also quite a
> heavy-weight setup (100's-1000's MBs). An alternative is to output a
> table in Markdown or HTML and convert
?latex
answers a lot of these questions.
The design intent of the latex() function is to construct one table at
a time in its own .tex flle.
The user then collects these and inserts them into a full document,
either manually or with Sweave.
The individual table has no context and no caption.
It i
The program 'gv' is installed on just about any linux system.
It has many available options (one, which might be useful,
being "-watch", whose effect is that if the file being displayed
is changed, e.g. by being over-written by a new file with the
same name, then 'gv' automatically updates what it
Okay, all.
I have it to work using this:
library(Hmisc)
options(latexcmd='pdflatex')
options(dviExtension='pdf')
options(xdvicmd='gnome-open')
Running your simple code from above... by question is this: the pdf
is saved in a tmp directory... where do I change the directory path? I
thought it wa
I'm surprised no one mentioned alternatives to LaTeX, which is not
necessarily installed on all systems and it's also quite a
heavy-weight setup (100's-1000's MBs). An alternative is to output a
table in Markdown or HTML and convert that to PDF. The poor man's
HTML-to-PDF is to manually open the
On 09/12/2014 20:47, Richard M. Heiberger wrote:
the last one is wrong. That is the one for which I don't know the
right answer on linux.
'xdvi' displays dvi files. you need to display a pdf file.
whatever is the right program on linux to display pdf files is what
belongs there.
On Macintosh
the last one is wrong. That is the one for which I don't know the
right answer on linux.
'xdvi' displays dvi files. you need to display a pdf file.
whatever is the right program on linux to display pdf files is what
belongs there.
On Macintosh we can avoid knowing by using 'open', which means u
I set these options:
options(latexcmd='pdflatex')
options(dviExtension='pdf')
options(xdvicmd='xdvi')
Maybe one too many? I'm running in Linux.
On Tue, Dec 9, 2014 at 3:24 PM, Richard M. Heiberger wrote:
> It looks like you skipped the step of setting the options.
> the latex function doesn'
Ah yes, you're right.
The log has this error:
! LaTeX Error: Missing \begin{document}.
Though can't really find much online on how to resolve it.
On Tue, Dec 9, 2014 at 1:15 PM, Jeff Newmiller wrote:
> pdflatex appears to have run, because it exited. You should look at the tex
> log file, the
It looks like you skipped the step of setting the options.
the latex function doesn't do pdflatex (by default it does regular
latex) unless you set the options
as I indicated.
On Tue, Dec 9, 2014 at 3:11 PM, Kate Ignatius wrote:
> Ah yes, you're right.
>
> The log has this error:
>
> ! LaTeX Erro
pdflatex appears to have run, because it exited. You should look at the tex log
file, the problem is more likely that the latex you sent out to pdflatex was
incomplete.
---
Jeff NewmillerThe .
Thanks! I do get several errors though when running on Linux.
Running your code, I get this:
Error in system(cmd, intern = TRUE, wait = TRUE) :
error in running command
Fiddling around with the code and running this:
tmp <- matrix(1:9,3,3)
tmp.tex <- latex(tmp, file='tmp.tex')
print.default(tm
yes of course, and the answer is latex() in the Hmisc package.
Why were you excluding it?
Details follow
Rich
The current release of the Hmisc package has this capability on
Macintosh and Linux.
For Windows, you need the next release 3.14-7 which is available now at github.
## windows needs the
d Winsemius
Sent: Saturday, 15 February 2014 14:28
To: Gil Gamesh
Cc: r-help@r-project.org
Subject: Re: [R] Printing a matrix in latexVerbatim without rownames.
On Feb 13, 2014, at 2:07 PM, Gil Gamesh wrote:
> Hi,
>
> I'm printing a bunch of summary tables to a latex file using
On Feb 13, 2014, at 2:07 PM, Gil Gamesh wrote:
> Hi,
>
> I'm printing a bunch of summary tables to a latex file using latexVerbatim
> from the Hmisc package.
>
> An example looks like this...
>
>> x
> Visit N Min. 1st Qu. Median Mean 3rd Qu. Max. NAs
> [1,] 1 92 25 27.28 29.05 2
Have you tried setting all the rownames to be the empty string? Its a
bit of a kludge, but a simple one.
On Thu, Feb 13, 2014 at 3:07 PM, Gil Gamesh wrote:
> Hi,
>
> I'm printing a bunch of summary tables to a latex file using latexVerbatim
> from the Hmisc package.
>
> An example looks like thi
On 13.11.2013 22:45, Elisa Frutos Bernal wrote:
Hi!
I need to print a graph that I have in a window. Previously I used:
try(win.print(), silent = TRUE)
if (geterrmessage() != "Error in win.print() : unable to start
device devWindows\n") {
plotFunctiond(screen = FALSE)
e, TIBCO Software
> wdunlap tibco.com
>
>
>> -Original Message-
>> From: Sam Steingold [mailto:sam.steing...@gmail.com] On Behalf Of Sam
>> Steingold
>> Sent: Monday, November 26, 2012 4:09 PM
>> To: William Dunlap
>> Cc: r-help@r-project.
. :1 Min. :2012-11-26 Min.Med.Max: 1 days... 4 days...16 days
> > 1st Qu.:2 1st Qu.:2012-11-27
> > Median :3 Median :2012-11-28
> > Mean :3 Mean :2012-11-28
> > 3rd Qu.:4 3rd Qu.:2012-11-29
> > Max. :5 Max. :2012-11-30
> >> s
; needed, as format.difftime does a reasonable job (except that it does not copy
> the input names to its output). I put it in to show how it gets called.
>
>
> Bill Dunlap
> Spotfire, TIBCO Software
> wdunlap tibco.com
>
>
>> -Original Message-
>> From: r
boun...@r-project.org] On
> Behalf
> Of Sam Steingold
> Sent: Monday, November 26, 2012 2:20 PM
> To: r-help@r-project.org; David Winsemius
> Subject: Re: [R] printing difftime summary
>
> > * David Winsemius [2012-11-26 08:46:35 -0800]:
> >
> > On Nov 26, 2012, at
1 - 100 of 218 matches
Mail list logo