JeffreyRacine / R-Package-np

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

Error in .C() #14

Closed wtf13 closed 6 years ago

wtf13 commented 7 years ago

Hi, I have been encountering the following error persistently on my computer when trying to run the npudensbw function from the np library: Error in .C("np_density_bw", as.double(duno), as.double(dord), as.double(dcon), : "np_density_bw" not available for .C() for package "np".

Could you kindly advise on the problem please? My np package installation has already been updated to the latest and I am running the code on R version 3.4.1.. Would I need any additional installations in order for the code to run smoothly? Thanks in advance for your help!

JeffreyRacine commented 7 years ago

Greetings,   I will need more information per the FAQ – kindly send code to replicate…  

From: wtf13 notifications@github.com Reply-To: JeffreyRacine/R-Package-np reply@reply.github.com Date: Friday, October 13, 2017 at 11:18 To: JeffreyRacine/R-Package-np R-Package-np@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [JeffreyRacine/R-Package-np] Error in .C() (#14)

 

Hi, I have been encountering the following error persistently on my computer: Error in .C("np_density_bw", as.double(duno), as.double(dord), as.double(dcon), : "np_density_bw" not available for .C() for package "np". Could you kindly advise on the problem please? My np package installation has already been updated to the latest and I am running the code on R version 3.4.1.. Would I need any additional installations in order for the code to run smoothly? Thanks in advance for your help! — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

wtf13 commented 7 years ago

Hi Jeffrey, Thanks for your quick response! Here is the error message when I tried to use the function for the mtcars example dataset.

library(np) Nonparametric Kernel Methods for Mixed Datatypes (version 0.60-3) [vignette("np_faq",package="np") provides answers to frequently asked questions] [vignette("np",package="np") an overview] [vignette("entropy_np",package="np") an overview of entropy-based methods] data(mtcars) hold<-npudensbw(~wt,data=mtcars) Error in .C("np_density_bw", as.double(duno), as.double(dord), as.double(dcon), : "np_density_bw" not available for .C() for package "np" Timing stopped at: 0 0 0

Appreciate your support and have a great weekend!

JeffreyRacine commented 7 years ago

Can’t replicate on four different platforms (UNIX, Linux, macOS, windows)… try reinstalling R and the np package perhaps?  

library(np) Nonparametric Kernel Methods for Mixed Datatypes (version 0.60-3) [vignette("np_faq",package="np") provides answers to frequently asked questions] [vignette("np",package="np") an overview] [vignette("entropy_np",package="np") an overview of entropy-based methods] data(mtcars) hold<-npudensbw(~wt,data=mtcars) summary(hold)   Data (32 observations, 1 variable(s)):   Bandwidth Selection Method: Maximum Likelihood Cross-Validation Formula: ~wt Bandwidth Type: Fixed Objective Function Value: -41.60913 (achieved on multistart 1)   Var. Name: wt Bandwidth: 0.245701 Scale Factor: 0.6443658   Continuous Kernel Type: Second-Order Gaussian No. Continuous Vars.: 1 Estimation Time: 0.002 seconds    

From: wtf13 notifications@github.com Reply-To: JeffreyRacine/R-Package-np reply@reply.github.com Date: Saturday, October 14, 2017 at 10:48 To: JeffreyRacine/R-Package-np R-Package-np@noreply.github.com Cc: "Racine, Jeffrey" racinej@mcmaster.ca, Comment comment@noreply.github.com Subject: Re: [JeffreyRacine/R-Package-np] Error in .C() (#14)

 

Hi Jeffrey, Thanks for your quick response! Here is the error message when I tried to use the function for the mtcars example dataset.

library(np) Nonparametric Kernel Methods for Mixed Datatypes (version 0.60-3) [vignette("np_faq",package="np") provides answers to frequently asked questions] [vignette("np",package="np") an overview] [vignette("entropy_np",package="np") an overview of entropy-based methods] data(mtcars) hold<-npudensbw(~wt,data=mtcars) Error in .C("np_density_bw", as.double(duno), as.double(dord), as.double(dcon), : "np_density_bw" not available for .C() for package "np" Timing stopped at: 0 0 0

Appreciate your support and have a great weekend! — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

wtf13 commented 7 years ago

Already tried to do so but the same result occurs even after reinstallation~ was wondering if the package has dependencies on other software or the internet? I am trying to run it on a computer that is internet-disabled, not sure if this is the cause of the problem. Thank you so much for helping with this!

JeffreyRacine commented 7 years ago

Nope… are you using binaries or building from source?  

From: wtf13 notifications@github.com Reply-To: JeffreyRacine/R-Package-np reply@reply.github.com Date: Saturday, October 14, 2017 at 11:01 To: JeffreyRacine/R-Package-np R-Package-np@noreply.github.com Cc: "Racine, Jeffrey" racinej@mcmaster.ca, Comment comment@noreply.github.com Subject: Re: [JeffreyRacine/R-Package-np] Error in .C() (#14)

 

Already tried to do so but the same result occurs even after reinstallation~ was wondering if the package has dependencies on other software or the internet? I am trying to run it on a computer that is internet-disabled, not sure if this is the cause of the problem. Thank you so much for helping with this! — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

wtf13 commented 7 years ago

I believe it's the binary distribution of R..

JeffreyRacine commented 7 years ago

Something messed up on your system… sounds like a compiler issue… try building from source and see if that resolves…  

From: wtf13 notifications@github.com Reply-To: JeffreyRacine/R-Package-np reply@reply.github.com Date: Saturday, October 14, 2017 at 11:13 To: JeffreyRacine/R-Package-np R-Package-np@noreply.github.com Cc: "Racine, Jeffrey" racinej@mcmaster.ca, Comment comment@noreply.github.com Subject: Re: [JeffreyRacine/R-Package-np] Error in .C() (#14)

 

I believe it's the binary distribution of R.. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

wtf13 commented 7 years ago

ok, thanks so much for your advice professor! I would need to have a C compiler installed in my computer to do this then?

JeffreyRacine commented 7 years ago

I presume you are using windows…   https://cran.r-project.org/bin/windows/Rtools/  

From: wtf13 notifications@github.com Reply-To: JeffreyRacine/R-Package-np reply@reply.github.com Date: Saturday, October 14, 2017 at 11:27 To: JeffreyRacine/R-Package-np R-Package-np@noreply.github.com Cc: "Racine, Jeffrey" racinej@mcmaster.ca, Comment comment@noreply.github.com Subject: Re: [JeffreyRacine/R-Package-np] Error in .C() (#14)

 

ok, thanks so much for your advice professor! I would need to have a C compiler installed in my computer to do this then? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

wtf13 commented 7 years ago

looks like I will have to use another computer, cant do the installation on my machine >< but thanks much!!