andrie / sss

R package to import files in the triple-s (Standard Survey Structure) format.
http://andrie.github.io/sss/
8 stars 5 forks source link

Problem importing sss files #12

Open aauro opened 2 years ago

aauro commented 2 years ago

Hi thank you for the package, as I try to understand how it works, I am having problems importing. I have a sss and csv files with same filename. I have used the read.sss() function. R creates the data frame and the variables seems to be there but for example the number of observations is not correct. If I try to view the dataframe in R studio view() I receive an error such as "no data in column ...". I have tries with the sample files inside the sss package and it works fine. I have also tried with the files downloaded from the triple-s offial website and I receive the same error. You could use the latter files to reproduce my error. I am using R 4 and R studio 2022.02.3 and sss version 0.2.1 and xml2 version 1.3.3

Thank you for any help you could provide

aauro commented 2 years ago

I was looking inside the sss file of the example 2 provided by triple-s official website (link in previous message.) It seems that columns have not been imported correctly inside R. Maybe that is part of the issue? Thanks

aauro commented 2 years ago

I was able to try different versions of triple-s format. It seems that the problem reading the files is with triple-s XML v2.0. I was able to successfully import datasets in triple-s XML v.1.2