I need someone to help me check this code. It seems not running

get function needed to check data

source('/cloud/project/projectfiles/check_data.R')

install necessary packages

source('/cloud/project/projectfiles/packages.R')

load necessary R packages

library(googlesheets4)
library(dplyr)

register your Google sheet

STOP! You have to paste your Google Sheet link below!

link <- "https://docs.google.com/spreadsheets/d/1G5nvI61rJ2f8bJoc1u08iL61Kxi-54wE38i2dd8_NEA"

get data from your Google sheet

df <- read_sheet(link, col_types="c")

run a few checks on the data

check_data(df)

plot relationships between cost and readers

qplot(readers, minimum, data = df)

This is what is coming out from the console

Selection:
Enter an item from the menu, or 0 to exit
Selection: ## run a few checks on the data
Enter an item from the menu, or 0 to exit
Selection: check_data(df)
Enter an item from the menu, or 0 to exit
Selection:
Enter an item from the menu, or 0 to exit
Selection: ## plot relationships between cost and readers
Enter an item from the menu, or 0 to exit
Selection: qplot(readers, minimum, data = df)
Enter an item from the menu, or 0 to exit
Connected to your session in progress, last started 2023-Apr-14 11:54:50 UTC (3 minutes ago)
Selection:

your code is mostly private so that we can't see it i.e. source()
just to underline this point
this sort of text :

Enter an item from the menu, or 0 to exit

is associated with the utils::menu() function, which we dont see that it has been called but probably has by something you did.
for the documentation

 ?menu

which contains an example use

switch(menu(c("List letters", "List LETTERS")) + 1,
       cat("Nothing done\n"), letters, LETTERS)
1 Like

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.