I`m a BSc student just getting into R. I've done a bunch of things already (mainly for Psych statistics, plotting and other basic stuff). Yet when I try to knit a script I very often get error Messages. At first it was the same two errors repeatedly;
"trying to use CRAN without setting a mirror"
&
"cannot open the connection Calls: ... withCallingHandlders -> withVIsible -> eval -> eval -> read.table -> file".
Both of which I finally managed to track down (taken from here: Can't resolve error in .Rmd file <Anonymous> ... withCallingHandlers -> withVisible -> eval -> eval -> & Set default CRAN mirror permanent in R)
And now that I'm finally over the technical issues, I keep getting bogged down in fundamental errors. Like RStudio not recognising basic commands like gather() and %>%, even though I have set the work directory, installed all the packages and put them in the workspace library. And when that didn't work, I copy/pasted someone else's, with the exact same codes that work and it still won't let me knit it to .hmtl.
I can't even check my basic work on any level and I feel like there must be some fundamental issue I'm missing. I've spent several hours a day troubleshooting introductory assignments (and even downloaded it on a different computer) and I keep getting these error messages every time I write any form of code.
Edit: [Data/HW6.txt] is just a generic table from the teacher for homework 6.
dat_w <- read.table(file="data/HW6.txt", header=TRUE, sep=",")
dat_l <- dat_w %>%
gather(adi:kft, key=Test, value=Score) %>%
arrange(Gruppe, Subj)
To which I put the packages and the commands
library(tidyr)
library(dplyr)
But when I go to knit that, the problem I get is still:
Error in dat_w %>% gather(adi:kft, key = Test, value = Score) %>% arrange(Gruppe, :
could not find function "%>%"
Edit 2: search()
results are:
[1] ".GlobalEnv" "package:dplyr" "package:tidyr" "tools:rstudio"
[5] "package:stats" "package:graphics" "package:grDevices" "package:utils"
[9] "package:datasets" "package:methods" "Autoloads" "package:base"