Hi Everyone! I am new to R programming. As a part of my course I need to use MLMOI package to work on molecular data, but while using
moimport(file1,nummtd=1,keepmtd = TRUE,keepwarnings =exfile ,export = exfile, molecular = datatype, coding=coding)
I have encountered with the following error,
Error in file.exists(file) : invalid 'file' argument
I have already imported "file1" in my environment. Please do help me with this!! Thank you 
Using help(moimport) shows what the function expects. There are two things here:
moimport() imports molecular data from Excel workbooks
and
file string; specifying the path to the file to be imported
Anything else won't do. It has to be an Excel sheet and it has to be a file. Even if you read in an Excel spreadsheet with another function and named it file1, moimport() will be unsatisfied.
When importing a file, it is necessary to quote it and to give a subdirectory name if it is not in your current working directory or a full path name if it outside. For this, the preferred way is to create an RStudio project and use the {here} library.
Example
library(here)
here() starts at /home/roc/projects/demo
dir(here("csv"))
# [1] "calc_Dec21.csv" "data_Dec21.csv" "slides_Dec21.csv"