JanLauGe / surveyr

Connect to surveygizmo API with R
MIT License
1 stars 0 forks source link

could not find function "pullsg" #1

Open JanLauGe opened 5 years ago

JanLauGe commented 5 years ago

@PoojaMilind asked:

If possible could you please shed some light on an error that I receive when I run the following code in Rstudio; api_key = "XXXXXXXXXXXXXX"; gizmo_response = pullsg(XXXXXXX, api_key, completes_only=TRUE, clean=TRUE) The error I receive is: Error in pullsg(XXXXXXX, api_key, completes_only = TRUE, clean = TRUE) : could not find function "pullsg" I have installed the following packages -knitr, devtools, dplyr, hhtr, shiny, tidyr, ggplot2, stringr, zoo, forcats and Rsurveygizmo.

Thank you so much for your time.

JanLauGe commented 5 years ago

@PoojaMilind, I had a quick look at this and it seems that you did not run the function definition. Try executing the entire code in pullsg.R. Check if there were any errors. If the code executed without any errors, try running your example above (in the same R session!)

PoojaMilind commented 5 years ago

@JanLauGe Thank you so much for your input I will try it and get back to you.

PoojaMilind commented 5 years ago

@JanLauGe I did try pullsg.R, it was executed without any error but when this was executed for the example above I got the following Error in pullsg.R(XXXXXX, api_key, completes_only = TRUE, clean = TRUE) : could not find function "pullsg.R" I will recheck all codes again for now. Thank you for your time.

JanLauGe commented 5 years ago

@PoojaMilind this time the problem is calling pullsg.R instead of pullsg()

PoojaMilind commented 5 years ago

@JanLauGe
What is the reason for the error? Do Ineed to install another package for it or change my codes? Thank you for your time.

JanLauGe commented 5 years ago

No, you tried to call a function with the name of the file instead of calling the function with the correct name. Again, what you should try is this:

gizmo_response <- pullsg(XXXXXXX, api_key, completes_only=TRUE, clean=TRUE)
PoojaMilind commented 5 years ago

Well I did think the same and already tried but it didn't work.

JanLauGe commented 5 years ago

What error message did you get?

PoojaMilind commented 5 years ago

Same Error, could not find function pullsg.