0

I'm using R package 'pubmed.mineR' package which provide 'gene_atomization' for fetching genes from pubmed abstract. but 'readabs' function read only single text file.

file <- list.files(pattern = "txt$")
abs <- readabs(file)

this code show error can anyone help for reading multiple abstract text file I also tried 'Corpus' function of 'tm' package, it is still not working

  • Maybe `abs_list <- lapply(file, readabs)`. This gives a list of all files read by the function. – Rui Barradas Feb 23 '19 at 08:52
  • can you suggest any code which can read multiple abstract @RuiBarradas – Dilip Parmar Feb 23 '19 at 09:00
  • I tried, `multiple_abs <- lapply(Sys.glob("*.txt"), readabs)` this can read muliple abstract text file, but now i stuck with `gene_atomization` function – Dilip Parmar Feb 23 '19 at 09:20
  • You must give a [reproducible](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) example that can recreate the error you are seeing. `Sys.glob("*.txt")` outputs the `*.txt` files I have on *my* disk, not on yours. Post the code that fetches the data from PubMed and everything relevant. – Rui Barradas Feb 23 '19 at 11:20

0 Answers0