savehistory() saves weird lines at the beginning in R

Viewed 14

When I save my commands of an R session to an .Rhistory file using the savehistory() command,

(Ex. savehistory=("C:/User/Document/history.Rhistory"))

It saves these weird lines below at the beginning of the .Rhistory file that I did not enter during my session. What are these lines and how do I get rid of these lines?

install.packages("BiocManager")
install.packages("BiocManager")
install.packages("BiocManager")
BiocManager::install("BiocInstaller")
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("BiocInstaller")
BiocManager::install("GenomeInfoDbData")
BiocManager::install("GenomeInfoDb")
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("BiocInstaller")
BiocManager::install("GenomeInfoDbData")
BiocManager::install("GenomeInfoDb")
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("BiocInstaller")
BiocManager::install("GenomeInfoDbData")
BiocManager::install("GenomeInfoDb")
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("BiocInstaller")
BiocManager::install("GenomeInfoDbData")
BiocManager::install("GenomeInfoDb")
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("BiocInstaller")
BiocManager::install("GenomeInfoDbData")
BiocManager::install("GenomeInfoDb")
pasCts <- system.file("coad_data.csv")
pasAnno <- system.file("coad_info.csv")
cts <- read.csv(pasCts,sep="\c",row.names="gene_id")
coldata <- read.csv(pasAnno, row.names=1)
dim(pasAnno)
head(pasAnno)
system.file("coad_data.csv")
cts <- read.csv(pasCts,sep=",",row.names="gene_id")
cts     <- read.csv( file.choose(), head=TRUE, row.names=1 )
coldata <- as.matrix( c(rep("CASE",20), rep("CONTROL",20)) )
View(coldata)
View(coldata)
View(coldata)
View(coldata)
cts     <- read.csv( file.choose(), head=TRUE, row.names=1 )
coldata <- as.matrix( c(rep("CASE",20), rep("CONTROL",20)) )
View(coldata)
View(cts)
View(coldata)
cts     <- read.csv( file.choose(), head=TRUE, row.names=1 )
coldata <- as.matrix( c(rep("tumor",53), rep("normal",27)) )
dimnames(coldata) <- list( colnames(cts), "condition" )
View(coldata)
rownames(coldata) <- sub("fb", "", rownames(coldata))
all(rownames(coldata) %in% colnames(cts))
all(rownames(coldata) == colnames(cts))
cts <- cts[, rownames(coldata)]
all(rownames(coldata) == colnames(cts))
View(coldata)
View(cts)
head(cts)
dim(coldata)
View(coldata)
head(coldata)
View(cts)
View(coldata)
cts     <- read.csv( file.choose(), head=TRUE, row.names=1 )
coldata <- as.matrix( c(rep("tumor",53), rep("normal",27)) )
dimnames(coldata) <- list( colnames(cts), "condition" )
View(coldata)
View(cts)
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("BiocInstaller")
a
a
BiocManager::install("DESeq2")
library("DESeq2")
cts     <- read.csv( file.choose(), head=TRUE, row.names=1 )
coldata <- as.matrix( c(rep("tumor",53), rep("normal",27)) )
dimnames(coldata) <- list( colnames(cts), "condition" )
cts <- cts[, rownames(coldata)]
dds <- DESeqDataSetFromMatrix(countData = cts
, colData = coldata
, design = ~ condition)
head(assay(dds))

This paragraph contains random words because stachoverflow doesn't let me post this yet because I didn't add enough detail to this post apparently.

0 Answers
Related