Entering edit mode
5.6 years ago
Pluto
▴
10
Hi , I executed the following code with that error Error in basename(file) : a character vector argument expected . Any suggestions?
if (!requireNamespace("BiocManager"))
install.packages("BiocManager")
BiocManager::install()
library(CellNOptR)
network =readSIF("C:/Users/T440s/Desktop/network.sif")
file = file.create("C:/Users/T440s/Desktop/network.sbml")
toSBML(network,file, bitString = c(rep(1,length(network$reacID))),version=c("standard","cellnopt"))
is
file
defined?SURE I created one named file
Please share the line where you defined
file
file = file.create("C:/Users/T440s/Desktop/network.sbml")
And just with :
To add to Bastien's point, the
file
argument to theCellNOptR::toSBML
function is the name of the file to save to (according to the manual), which is a plain string.file.create
(as with all file manipulation operations of its class) returns a boolean value based on if the operation succeeded (see the relevant manual. You're passing aTRUE
/FALSE
value to a parameter than expects a filename string.