Skip to content

warning when reading datapackage.json with R #70

@GeraldGrootRoessink

Description

@GeraldGrootRoessink

This warning happens when I read a generated datapackage.json:

library("jsonlite")
json_file <- 'https://onderwijsdata.duo.nl/dataset/rio-objecten-v0/datapackage.json'
json_data <- fromJSON(paste(readLines(json_file), collapse=""))
Warning message:
In readLines(json_file) :
incomplete final line found on 'https://onderwijsdata.duo.nl/dataset/rio-objecten-v0/datapackage.json'
for(i in 1:length(json_data$resources$path)) {
if(!is.na(json_data$resources$format[i])) {
if(json_data$resources$format[i]=="CSV") {
path_to_file = json_data$resources$path[i]
assign(json_data$resources$name[i], read.csv(url(path_to_file)))
}
}
}

Not sure what the rules are. Maybe the package should end with a Linefeed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions