creating an article in rmarkdown. doing text before graphic . Knitting (without graphic)to either pdf or word ,no problem. Inserting plots. running each plot code in the rmarkdown file works fine.
When I try to knit to output I get the message below.
dfpop is a dataframe in global r environment.
Tried "the yellow pages" (other topics here/ stack overflow, Google) without result. Am not a data scientist .
All help appreciated.thank you
dfpop
#> Error in eval(expr, envir, enclos): object 'dfpop' not found
Hello and thank you for answering.
it's exactly the point I'm not sure how or if I have done that. tried load(file)but the file could not be accessed ?
dfpop is an object I created by assigning a data frame to dfpop ,it´s in the general environment of R.
Perhaps you are using a normal r script to read excel and prepare objects then going to your markdown and expecting those objects to be there to be knittable. That would be an incorrect assumption. Rmd should be self contained. I.e. move your read excel code into the rmarkdown also. You can hide the chunk from being rendered out, but it needs to be there.
library(readxl)
DFST1 <- read_excel("~/Desktop/DFST1.xlsx",
range = "B2:AJ101", na = "NA")
View(DFST1)
get the following message:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Quitting from lines 27-31 (Tryout1.Rmd)
Error in View(DFST1) : X11 dataentry cannot be loaded
Calls: ... withCallingHandlers -> withVisible -> eval -> eval -> View
Execution halted.
don´t know what I am doing wrong
Hi,
I'm not completely sure but I think that you get this error because you can't use de View()function inside a R Markdown document. Then, remove the line View(DFST1) from your code.
You're welcome. Hope it helps.
Greetings.