JeffreyRacine / R-Package-np

R package np (Nonparametric Kernel Smoothing Methods for Mixed Data Types)
https://socialsciences.mcmaster.ca/people/racinej
46 stars 18 forks source link

Fix CRAN errors #38

Open benkeser opened 2 years ago

benkeser commented 2 years ago

This PR attempts to fix build errors noted on CRAN and noted in #37.

There are two fixes needed:

1. Change model formula in np.Rnw

I am not sure the intention of this model formula.

model.scoef <- npscoef(lwage ~ dfemale +
                       dmarried +
                       educ +
                       exper +
                       tenure | female,
                       betas = TRUE,
                       data = wage1.augmented)

but the CRAN error is related to the tenure | female line, apparently because female is a factor. I changed to the integer-valued dfemale and it seems to fix the error.

2. Changing utf encoding in inputenc

The error regarding extra characters with Ahat character seems to be related to the use of the line

\usepackage[utf8x]{inputenc} 

According to this StackOverflow answer, utf8x is no longer needed and utf8 can be used instead.

I have used RHub build on debian-gcc-devel and it builds successfully without error. I haven't checked the other architectures, but given that the warnings are the same, I anticipate that these changes will correct them.

I am a big fan of this package and it'd be a shame to see it archived. Please let me know if you need additional help to make sure it stays on CRAN.