0

Struggling turning this into a reprex due to the local csv file it uses. It says the file is not found in the directory. Any help is great thanks!

library(tidyverse)
library(ggplot2)
library(dplyr)
library(RColorBrewer)
library(cronR)
library(miniUI)
library(shiny)
library(shinyFiles)
library(pdftools)
library(tm)
library(readtext)
library(stringr)
library(plyr)
library(lubridate)
library(openxlsx)
library(rio)
library(reprex)


RAO <- readr::read_csv(file = "RateAddOnsExcel.csv")
RAO <- as.data.frame(read.csv(file = "RateAddOnsExcel.csv", header=TRUE, sep = ","))
RAO$X10.01.18 <- NULL
RAO$...4 <- NULL
RAO$...5 <- NULL
RAO$Quarter. <- NULL
names(RAO)[1:13] = c("ProviderName","AIMNumber", "ChainName", "RateEffectiveDate", "ComponentTotal", 
                     "VentAddOn", "QualityAddOn", "SpecialCareUnitAddOn", "AssessmentAddOn", 
                     "SelectedExpenditureAddOn", "RateReduction", "CaseMixRate", "CaseMixAssessment")
RAO[grepl("Myers", RAO$ProviderName),]
RAO[!grepl("Index", RAO$ProviderName),]

View(RAO)
reprex::reprex(outfile = NA)
RyanUsesR
  • 3
  • 2
  • 1
    Well is the file really in the good directory? ``getwd()``. Have you try to do it with the full path to the file? Also why do you ``read_csv()`` the file 2 times? – Gainz Jun 20 '19 at 17:50
  • 3
    Are you trying to solve the problem of "How to make a reproducible example involving a local CSV file?" or "How do I solve this 'file not found' error?". Normally, I'd assume you want to fix the error, but since your title is "*How do i turn this into a reprex*", I want to doublecheck. – Gregor Thomas Jun 20 '19 at 18:01
  • @Gregor Good question, I assumed he wanted to solve 'file not found' so he could then use it as a reproducible example. – Gainz Jun 20 '19 at 18:04
  • 1
    Possible duplicate of [creating reproducible example using reprex package in r where a local file is being read](https://stackoverflow.com/questions/48874304/creating-reproducible-example-using-reprex-package-in-r-where-a-local-file-is-be) – M-- Jun 20 '19 at 18:49
  • @Gregor I was wanting to know hot to get rid of the error to turn it into a reprex – RyanUsesR Jun 21 '19 at 17:56

0 Answers0