I am trying to knit my r-markdown but every time I try and do it, I keep getting this same error, and no matter what I do nothing seems to fix it.
Error:
! object 'daily_activity' not found
Backtrace:
1. utils::head(daily_activity)
Execution halted
What I am trying to do is, I have a csv file called "dailyActivity_merged" and I uploaded it to rstuido without a problem and everything is fine there, I then do is read the csv as this,
then I use the head() function to see the first few rows of the dataset and the dataset runs fine in the source code and i can see the data.frames but once I go to knit the project it give me the error above. Am I doing something wrong?
So what I did was, I went to files in the bottom right of Rstudio and then clicked upload which then let me choose a file from my desktop, once I chose the correct csv file the file then showed up in the files tab. Then i did the read.csv command.
But every time I run the head() command it only shows the data.frames in the source code but when I knit everything together I keep getting the I mentioned above.
In this data analysis report, I delve into a dataset capturing non-Bellabeat smart devices between the 1st of April 2016 and the 31st of May 2016. It is sourced from the FitBit Fitness Tracker Data. Throughout this analysis, I aim to gain more insight into how consumers are using their smart devices.
About the Company
Bellabeat is a company that's pioneering into the fem-tech realm, Bellabeat is a women's wellness company that has helped millions of women track their cycle, pregnancies, and lives. Founded in 2014 their mission is to empower women to take control of their health by providing them with technology-driven solutions that blend design and function
Stakeholders
Urška Sršen: Bellabeat's cofounder and Chief Creative Officer
Sando Mur: Mathematician and Bellabeat's cofounder; key member of the Bellabeat executive team
Bellabeat marketing analytics team: A team of data analysts responsible for collecting, analyzing, and reporting data that helps guide Bellabeat's marketing strategy.
Report Stucture
This report is organized as the follows
Data Overview: dataset overview, dataset source.
Data Preprocessing: data cleaning, handling missing values, data visualizations, and key findings.
Data Analysis: statistical summaries, data visualizations.
Conclusions: summary of the main insights from the analysis.
Reference: references used in the report
Business Questions
This analysis aims to answer the following key business questions
1. What are some trends in smart device usage?
2. How could these trends in apply to Bellabeat customers?
3. How could these trends help influence Bellabeat marketing strategy?
A small point: loading the tidyverse package will also load nine more packages, including lubridate, dplyr, ggplot2, and tidyr. All you need is
library(tidyverse)
library(skimr)
More importantly, where is the code to import the dailyActivity_merged.csv file? Even if you already ran read.csv("dailyActivity_merged.csv") you need to include that in the code that is run when knitting the R Markdown document. As @startz noted "Everything in a markdown file is separate from everything else in your session."
So what I did was I went to the bottom right where you can see what files and packages are being used and there is a button that says upload so I uploaded the files that way because every time I tried to call it from my desktop it says I can't do that. So what I thought to do next was to change the directory but it wouldn't let me do that either. So I thought that if I just uploaded it that way, it would work, but still nothing worked.
Uploading a file from your computer to the cloud is very different from importing it into the R environment. You have successfully uploaded the csv file but must then include