As @Roland pointed out, you have matrix, not data.frame, and they have different default methods print. When using, matrixyou can set quote = FALSEexplicitly to printor use noquote.
Here is an example:
## Sample data
x <- matrix(c(17, "chr1", 0, "miRNA", 18, "chr1", 0, "miRNA"), nrow = 2,
byrow = TRUE, dimnames = list(
NULL, c("position", "chrom", "value", "label")))
## Default printing
x
# position chrom value label
# [1,] "17" "chr1" "0" "miRNA"
# [2,] "18" "chr1" "0" "miRNA"
## Two options to make the quotes disappear
print(x, quote = FALSE)
# position chrom value label
# [1,] 17 chr1 0 miRNA
# [2,] 18 chr1 0 miRNA
noquote(x)
# position chrom value label
# [1,] 17 chr1 0 miRNA
# [2,] 18 chr1 0 miRNA
, , matrix data.frame . A data.frame , (, , ..). a matrix data.frame . type.convert ( data.frame read.table ):
y <- data.frame(x, stringsAsFactors = FALSE)
str(y)
# 'data.frame': 2 obs. of 4 variables:
# $ position: chr "17" "18"
# $ chrom : chr "chr1" "chr1"
# $ value : chr "0" "0"
# $ label : chr "miRNA" "miRNA"
y[] <- lapply(y, type.convert)
str(y)
# 'data.frame': 2 obs. of 4 variables:
# $ position: int 17 18
# $ chrom : Factor w/ 1 level "chr1": 1 1
# $ value : int 0 0
# $ label : Factor w/ 1 level "miRNA": 1 1
y
# position chrom value label
# 1 17 chr1 0 miRNA
# 2 18 chr1 0 miRNA