You can use:
print(dd1, row.names=F)
# Chisq DF Pr(>Chisq) term
153.0216306 1 7.578366e-35 # Sex
13.3696538 1 5.114571e-04 # Volume
0.8476713 1 7.144239e-01 # Weight
1.2196050 1 5.388764e-01 # Intensity
2.6349405 1 2.090719e-01 # ISO
6.0507714 1 2
On Jul 4, 2014, at 7:27 AM, Gang Chen wrote:
I really your kind help! This is exactly what I was looking for
except that I need to get rid of the numbered row names.
Look at the documentation:
?print.data.frame
You cannot "get rid of" rownames in dataframes (at least as far as I
know)
I really your kind help! This is exactly what I was looking for except that I
need to get rid of the numbered row names.
On July 3, 2014 9:57:00 PM EDT, arun wrote:
>Hi,
>May be this helps:
>nC <- max(nchar(row.names(dd)))
>Â term <- formatC(row.names(dd), width=-nC)
>#or
>Â term <- sprintf("%-1
Perfect! Thanks a lot!
On July 3, 2014 5:10:02 PM EDT, David L Carlson wrote:
>Not elegant, but it works:
>
>> term <- dimnames(dd)[[1]]
>> dd1 <- dd
>> dimnames(dd1)[[1]] <- rep("", 6)
>> dd2 <- capture.output(dd1)
>> cat(paste(dd2, " ", c("Term", term)), fill=48)
> # Chisq DF Pr(>Chisq)
Hi,
May be this helps:
nC <- max(nchar(row.names(dd)))
term <- formatC(row.names(dd), width=-nC)
#or
term <- sprintf("%-11s", row.names(dd))
dd1 <- setNames(data.frame(unname(dd), term,stringsAsFactors=F),
c(colnames(dd), formatC("term",width=-nC)))
dd1
# # Chisq DF Pr(>Chisq) term
Not elegant, but it works:
> term <- dimnames(dd)[[1]]
> dd1 <- dd
> dimnames(dd1)[[1]] <- rep("", 6)
> dd2 <- capture.output(dd1)
> cat(paste(dd2, " ", c("Term", term)), fill=48)
# Chisq DF Pr(>Chisq) Term
153.0216306 1 7.578366e-35 # Sex
13.3696538 1 5.114571e-04 # Vo
Hi Ed,
In addition to Michael's suggestion (which is probably what you want),
consider something like:
head(mtcars)
tail(mtcars)
or for just the corners, you could try a little function like this:
corner <- function(x, n = 3L, ...) {
stopifnot(length(n) == 1L)
if (n < 0L || n * 2 > min(dim(
Welcome to the dark-side!
I think the View() command will do what you want. This brings up a new
window that displays the data spreadsheet style and you can scroll wherever
you wish. If you want to do work in your command window, the head() and
tail() commands will be of help to you.
If you are j
8 matches
Mail list logo