I'm trying to create a very simple R markdown and cannot get through sorting the environments. But before I even get to knitting the document I have a problem when running the operative code chunk. I read a file into input_df, filter it and put the result in output_df. It appears in my global environment when I run the chunk. Then I have View(output_df) as the next line in the chunk. It works. I see output_df.
Next line is to write output_df using the write_xlsx function. Error in is.data.frame(x) : object 'ouput_df' not found. Why can I see output_df in my global environment and why did the program see it in the immediately preceding line of code, but not in the code beginning with write_xlsx?
Thank you. I'm an idiot for not seeing that. So I fixed that, and now my ultra-simple R markdown works. I was having a different problem before in my more complex working file. I'll see if I can avoid that issue or at least create a simple example of it.
Thanks, again.
If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it: