# list objects in the working environment
ls()
# list the variables in mydata
names(mydata)
# list the structure of mydata
str(mydata)
# list levels of factor v1 in mydata
levels(mydata$v1)
# dimensions of an object
dim(object)
# class of an object (numeric, matrix, data frame, etc)
class(object)
# print mydata
mydata
# print first 10 rows of mydata
head(mydata, n=10)
# print last 5 rows of mydata
tail(mydata, n=5)
for(dt in names(data)){
print(dt)
write.table(data[[dt]], file=dt, sep='\t', quote=FALSE, row.names=FALSE)
}
Mat <- read.table(file="file_name.tsv", sep = '\t', header = TRUE, row.names=1)
Reference
- https://www.statmethods.net/input/contents.html
'R' 카테고리의 다른 글
[R] TCGAbiobanks (0) | 2022.03.10 |
---|---|
[R] predict (0) | 2021.10.19 |
[R] Enhanced Volcano plot (0) | 2021.10.12 |
[R] boxplot options (0) | 2021.10.06 |
[R] install packages (0) | 2021.10.05 |
댓글