After I loaded the package Rsamtools, I tried to read a ban data file. Then I got the error message
Error in scanBam("C:/Sequence/SeqData/bam/A1.bam") : could not find function "scanBam"
Here is the R code
load library
library(Rsamtools)
read in entire BAM file
bam <- scanBam("C:/Sequence/SeqData/bam/A1.bam")
Session Info as follows
sessionInfo( )
R version 4.0.5 (2021-03-31) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19041)
Matrix products: default
locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] BiocManager_1.30.15
loaded via a namespace (and not attached): [1] compiler_4.0.5 tools_4.0.5