I am creating an R package and trying to run devtools::check(). The generated NOTE appear as follows :
checking R code for possible problems ... NOTE myFunction: missing arguments not allowed in calls to ‘list’
How to know which argument is missing? What does that even mean? I have a large function with many variables.
Here is part of the function: It is basically creating an html-report for my bioinformatics analysis.
cAMARETTO_HTMLreport <- function(cAMARETTOresults,
cAMARETTOnetworkM,
cAMARETTOnetworkC,
PhenotypeTablesList = NULL,
output_address ="./",
HTMLsAMARETTOlist = NULL,
CopyAMARETTOReport = TRUE,
hyper_geo_reference = NULL,
hyper_geo_reference_gp = NULL,
hyper_geo_reference_cp = NULL,
driverGSEA = TRUE,
NrCores=2){
##################################### Bioconductor Considerations :
Run_Names <- AMARETTOres <- Weights <- Color<- Type<- GeneNames<-NULL
GeneName <- Community <- TypeColored <- Community_key<-NULL
Community_type<- ModuleNr<-NULL
ModuleName <- Run <- Genes <- q.value<-NULL
#####################################
RunInfoList<-InitialCheckInputs(cAMARETTOresults=cAMARETTOresults,
output_address,
HTMLsAMARETTOlist=cAMARETTOresults,
CopyAMARETTOReport,
hyper_geo_reference,
hyper_geo_reference_gp,
hyper_geo_reference_cp)
RunInfo<-RunInfoList$RunInfo
RunInfo2<-RunInfoList$RunInfo2
full_path<-RunInfoList$full_path
HTMLsAMARETTOlist<-RunInfoList$HTMLsAMARETTOlist
#====================================================================
# Extract main dataframes
com_gene_df<-suppressWarnings(
ComRunModGenInfo(cAMARETTOresults,cAMARETTOnetworkM,
cAMARETTOnetworkC))
comm_info <-suppressWarnings(
cAMARETTO_InformationTable(cAMARETTOnetworkM,cAMARETTOnetworkC))
#====================================================================
Runs_AMARETTOs_info<-com_gene_df%>%
dplyr::select(Run_Names,AMARETTOres)%>%
dplyr::distinct()%>%
dplyr::mutate(Run_Names = RunHyperLink(Run_Names,AMARETTOres,
HTMLsAMARETTOlist,CopyAMARETTOReport))%>%
filter(AMARETTOres==1)%>%select(Run_Names)
#====================================================================
ComModulesLink<-CommunityModuleTableCreate(cAMARETTOresults,
cAMARETTOnetworkM,
cAMARETTOnetworkC,
HTMLsAMARETTOlist,
CopyAMARETTOReport)
#====================================================================
...
}
Thank you so much @Martin Morgan. You were indeed right and one of my lists was in wrong format: list(a,) changed to list(a) and it and I don't get the error anymore.
Many Thanks Mohsen
Thank you so much @Martin Morgan. You were indeed right and one of my lists was in wrong format: list(a,) changed to list(a) and it and I don't get the error anymore.
Many Thanks Mohsen