I realize that this is a long shot, but did you ever find a fix to this? I'm getting the same error but samtools seems to be installed correctly. I can run it in terminal but R can't find it.
The original answer still applies. If the package you are trying to use -- which package? -- requires the samtools application to be installed (and discoverable, so somewhere in specified by the PATH environment variable) then you'll need to install samtools independently of R. If you need help doing that, then probably you need to ask somewhere (biostars?) where there is more likely to be relevant expertise.
samtools isn't R software, so you would have to install it independently of R. This might be 'hard' on Windows. But maybe the task that you want to accomplish doesn't require the package with the unfriendly dependency on samtools?
I realize that this is a long shot, but did you ever find a fix to this? I'm getting the same error but samtools seems to be installed correctly. I can run it in terminal but R can't find it.
Cheers
The original answer still applies. If the package you are trying to use -- which package? -- requires the samtools application to be installed (and discoverable, so somewhere in specified by the PATH environment variable) then you'll need to install samtools independently of R. If you need help doing that, then probably you need to ask somewhere (biostars?) where there is more likely to be relevant expertise.
Alternatively, if you're trying to access or manipulate BAM files from within R, you might try the Rsamtools or GenomicAlignments (or VariantAnnotation, for VCF) packages.