Horje
how to read a vector input in r Code Example
how to read a vector input in r
elements_ <- c()
# let's say this vector consists of 4 elements
total_dim <- 4
# Using a for loop statement and the sequence function
for (i in seq(total_dim)) {
  elements_[i] <- as.numeric(readline(paste("Enter element",i,": ")))
}




R

Related
operators R Code Example operators R Code Example
read delim in r with lapply read.delim sep Code Example read delim in r with lapply read.delim sep Code Example
r count list Code Example r count list Code Example
reduce ggtitle size Code Example reduce ggtitle size Code Example
how to add columns to a flextable in r Code Example how to add columns to a flextable in r Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7