0

I have used the "htmltab" library to get data on the NFL draft and combine. The data has been selected fine but they are lists at the moment. I intend to merge them and perform analysis the data. at the moment it looks like this: image List of combine 2016 1 Whenever I try use the unlist method I lose the headers of the columns and they are still remaining as a list. any suggestions on this?

urlcom16 <- "http://nflcombineresults.com/nflcombinedata.php?
year=2016&pos=&college="
com16 <- htmltab(doc=urlcom16, which=1)
Daniel Murran
  • 95
  • 2
  • 2
  • 7
  • Please make this question [reproducible](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). Also, since you're talking about lists and data.frames, there should be no need to introduce a non-base function `htmltab` (you need to specify the package if you must keep the function), just include a sample of `com16` (since we have no idea what it looks like). Then show the code you use that produces the undesirable output. Lastly, show the actual output and what you are expecting. – r2evans Dec 09 '17 at 16:59

1 Answers1

0

Try as.data.frame(com16). If it doesn't work, you might not have the same vector length in each list entry.