Posts

Integrating ChatGPT in R: A Comprehensive Guide

  Nirmal Ghimire, Ph.D. K-16 Literacy Center at University of Texas at Tyler 2023-03-03 Step 1: Get chatGPT API Step 2: Loading Required Libraries Step 3: Running chatGPT 3.a. Save chatGPT API an an Object 3.b. Use the Curl Command and Run the chatGPT 3.c. Clean the Output Using {stringr} 4. Putting Everything Together and Creating a Single Function 5. Testing the Single Funtion: “What are the difference between R and Python?” 6. Asking chatGPT How to Create a Simulated Data 7. Check If Data Set Can be Created Using Suggested Method 8. Running Regression 9. Asking chatGPT to Interpret Findings 10. Does chatGPT Draw? 11. And Finally … This is how I often set up my global options that help me keep my output nice and clean.  Click on the  Show Code  button to find the actual code. knitr :: opts_chunk $ set ( echo = TRUE , comment = NA , warning = FALSE , message = FALSE , tidy = 'styler

Testing EdSurvey, WeMix, Dire, MICE and Other Important R packages with Sample Educational Research PART 3

Image
  Part III               Part I          Part II AUTHOR AFFILIATION Nirmal Ghimire, Ph.D. K-16 Literacy Center at University of Texas at Tyler PUBLISHED February 28, 2023 # Loading Files teacher_final <- read.csv ( "C:/Users/nghimire/OneDrive - The University of Texas at Tyler/Redirected Folders/Documents/edsurvey_PISA_USA/teacher_data_final.csv" , as.is = TRUE ) str (teacher_final) 'data.frame': 3526 obs. of 14 variables: $ school_id : int 1 1 1 1 1 1 1 1 1 1 ... $ teacher_id : int 593 3408 1829 471 2114 1269 1379 3595 2183 669 ... $ gender : int 0 0 0 0 0 NA 1 1 0 0 ... $ age : int 49 42 50 50 56 NA 45 31 55 48 ... $ teacher_type : int 1 1 1 1 1 NA 0 1 1 1 ... $ full_time : int 0 0 0 0 0 NA 0 0 0 0 ... $ emp_stat : int 0 0 0 0 0 NA 0 0 0 0 ... $ teaching_exp : int 20 12 21 26 29 NA 16 8 13 25 ... $ teacher_edu : int 2 2 2 2 2 NA 2 2 2 1 ... $ initial_qual : int 0 0 0 0 0 NA 0 0 0 0 ... $ training : i