I've followed a couple of these posts here and here but am still struggling with loading an ASCII file.
I'm trying to pull down the county-level Area Health Resources File but it's not loading correctly. I've now tried:
> df <- read.table("DATA/ahrf2018.asc")
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
line 1 did not have 312 elements
> dim(df)
[1] 3350 5
> df <- read.delim("DATA/ahrf2018.asc")
> dim(df)
[1] 3229 1
> df <- read.csv("DATA/ahrf2018.asc")
> dim(df)
[1] 3350 5
> df <- read.csv("DATA/ahrf2018.asc", header = FALSE, skip = 1)
> dim(df)
[1] 3350 6
And I looked into the LaF
package, but don't know the column types which are required.
Is there something painfully simple I am overlooking?
EDIT: Example of output, where columns not getting created:
V1
1 01001AHRF 01001 20181821232435Alabama ALAutauga Autauga
2 01003AHRF 01003 20181821232435Alabama ALBaldwin Baldwin
3 01005AHRF 01005 20181821232435Alabama ALBarbour Barbour
4 01007AHRF 01007 20181821232435Alabama ALBibb Bibb