问题
i am stuck with this problem in R code please help me
I am trying to create a miodin project and then read a file to dataframe so when i insert the file to the project folder it shows the following error
arguments imply differing number of rows: 15, 12
Here is my code
library(miodin)
mp <- MiodinProject(
name = "MyProject",
author = "lee",
path ="." )
countTable <- read.table(paste0("data/",'seq.txt'),
header = TRUE,
sep = '\t',
stringsAsFactors = FALSE
)
sampleTable <- data.frame(
SampleName = colnames(countTable),
SamplingPoint = paste0('sp',rep(1, 12)),
Treatment = rep(c('LineA', 'LineB'), 6)
)
assayTable <- data.frame(
SampleName = colnames(countTable),
DataFile = paste0("data/",'seq.txt'),
DataColumn = colnames(countTable))
ms <- studyDesignCaseControl(
studyName = "CaseControlStudy",
factorName = "Treatment",
caseName = "LineA",
controlName = "LineB",
contrastName = "Treatment",
numCase = 6,
numControl = 6,
sampleTable = sampleTable,
assayTable = assayTable,
assayTableName = "RNAseq"
)
insert(ms, mp)
mshow(ms)
来源:https://stackoverflow.com/questions/61758189/arguments-imply-differing-number-of-rows-15-12