Different ways to make your R session interactive for asking question and receive the answer as an input. readline You can find some example in StackOverflow or Geeksforgeeks. Basically is just like this: cp <- as.integer(readline(prompt = "Vil du kopiere filen?
Read MoreEnvironment
Updated: 2022-04-12 Several nice blogs and references on the net to read on this stuff. Among those: Environments in R How R Searches and Finds Stuff This discussion from StackOverflow and here explains nicely with example on the difference between parent.
Read Morenames attribute
Sometime an object has attribute names for identification of the value with names instead of index. There are time you need to extract the names of a vector or object. The easiest way is to do: library(data.table) dt <- cars[1,] setDT(dt) str(dt) dt[, dist := as.
Read MoreClean attributes
When reading data from SPSS or Stata into R, the metadata will also be inherited to the dataset. Sometimes it can be useful for extra information, but most of the time it’s not needed. To get rid of these metadata then do this:
Read MoreCI/CD and Code Coverage
Updated: 2023-05-24 A simple guide to use CI/CD and Code coverage. For CI tasks will be done using GitHub Actions. Some examples of yaml files for CI tasks can be found here eg. check-standard.yaml file. CI/CD This is a simple process to implement CI/CD using GitHub Actions with usethis package.
Read More