Skip to content

Conversation

@cimentadaj
Copy link
Contributor

@cimentadaj cimentadaj commented Dec 21, 2016

Hi,

Sorry for the previous pull request. It was a bit disorganized and in Spanish (which for some reason I thought both maintainers spoke).

Working with TIMSS 2007 G8, running a call like this one timssg8.select.merge(folder = folder, student = c("BSBGMFED", "BSBGFMED")) yields an error undefined columns. The problem is after running lines 84-85 (from your unmodified code) that reads the SPSS data sets. If you were to inspect the function line by line with the data manually, right after lines 84-85, running this sapply(junk0, function(x) all(tolower(names(x) == names(x)))) will show you that Austria has all variable names in lower case whereas all other countries have upper case. This was throwing the error of undefined columns because the subset columns are always provided in upper case.

I added lines 84-87 (in my pull request) that simply transforms all country variable names into upper case. The other changes (lines 74-90) are simply a reordering of the code. I also did the upper case transformation for the home and school data as well. This should also be applied to the teacher data. Whenever I have some time I plan to take care of that as well.

Before rbinding and subsetting arbitrary columns, I converted each countries variable names to upper case. This was crashing because some country variable names were lower case.
@clreiter
Copy link

Hi,
After using the intsvy package for two year now, I suddenly experience issues with the the piaac.mean.pv function, receiving the following error message:

Fehler in sum(sapply(seq_along(pvnames), function(i) (PV.mean[i] - MEAN.m)^2)) :
ungültiger 'type' (list) des Argumentes
Zusätzlich: Warnmeldungen:
1: In grep(pvnames, names(data), value = TRUE) :
Argument 'pattern' hat einen Länge > 1 und nur das erste Element wird benutzt
2: In mean.default(PV.mean) :
argument is not numeric or logical: returning NA
3: In mean.default(PV.sd) :
argument is not numeric or logical: returning NA
4: In mean.default(sapply(seq_along(pvnames), function(i) cc * sum((R.mean[, :
argument is not numeric or logical: returning NA

Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants