openml / openml-r

R package to interface with OpenML
http://openml.github.io/openml-r/
Other
95 stars 37 forks source link

getOMLDataSetQualities for more than one datasets #440

Closed BayanIbra closed 5 years ago

BayanIbra commented 5 years ago

I am trying to get the dataset qualities for 100 specific datasets but I keep getting errors. Can you please advice?

for(i in 103) { qualities <- getOMLDataSetQualities(data.id=studydata.id[i]) i<- i +1}

Error in doHTTRCall(method, url = url, query = list(api_key = conf$apikey), : ERROR (code = 100) in server response: Function not valid

giuseppec commented 5 years ago

your for-loop looks wrong. I guess what you want to do is to get the data qualities for all data id's included in studydata.id:

for(i in 1:length(studydata.id)) {
  qualities <- getOMLDataSetQualities(data.id=studydata.id[i])
}

If there is still an error for one single data set, you could also try:

qualities = lapply(studydata.id, function(x) {
  try(qualities = getOMLDataSetQualities(data.id=studydata.id[i])
})
BayanIbra commented 5 years ago

I tried both syntax I get the same error.
Error in doHTTRCall(method, url = url, query = list(api_key = conf$apikey), : ERROR (code = 364) in server response: Dataset processed with error Problem validating uploaded description file: XML does not correspond to XSD schema.

BayanIbra commented 5 years ago

The first one worked. Thanks