Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tool <- readline(prompt='Enter a Barcode: ')
- if (! tool %in% df$Barcode.Number) {
- message("Barcodes not found.")
- } else {
- initials <- readline(prompt='Enter your Initials: ')
- job <- readline(prompt='Enter job number: ')
- suppressMessages(library(dplyr))
- message("Good to Go!")
- df[df$Barcode.Number == tool, "DATE"] = as.character(Sys.Date())
- df[df$Barcode.Number == tool, 'Initial'] = initials
- df[df$Barcode.Number == tool, 'Job.Number'] = job
- df1 <- df %>% filter(df$Barcode.Number == tool) %>%
- select(Type.Equipment, Location)
- print(df1)
- df[df$Barcode.Number == tool, "Usage"] = df[df$Barcode.Number ==
- tool, "Usage"] + 0.5
- df$Status <- ifelse((df$Usage %% 1) , 'Out', 'In')
- }
- Barcode.Number Type.Equipment Manufacture Times.Used Initials Job
- 4041 Flashlight Surefire 1 GP 0
- 4680 Capstan Honda 1 GP 0
- 4682 Deep Cut Band Saw Milwaukee 1 GP 0
- getnumbers = function(){
- tool <- readline(prompt='Enter the Barcodes: ')
- tools <-scan(text=tool,quiet=TRUE,sep=",")
- cat("Your tools are:",tools)
- invisible(tools)
Add Comment
Please, Sign In to add comment