# Example 1: Load toy data from a CSV file
file_path <- system.file("extdata", "toy_data.csv", package = "somhca")
# Run the loadMatrix function with the mock data
myMatrix <- loadMatrix(file_path, TRUE, "minMax")
# Example 2: Load from a toy data frame
df <- data.frame(
ID = paste0("Sample", 1:100), # Character column for row headings
matrix(rnorm(900), nrow = 100, ncol = 9) # Numeric data
)
# Run the loadMatrix function with the mock data
myMatrix <- loadMatrix(df, TRUE, "zScore")
# Example 3: Load from a toy matrix
mat <- matrix(rnorm(900), nrow = 100, ncol = 9) # Numeric data
# Run the loadMatrix function with the mock data
myMatrix <- loadMatrix(mat, FALSE, "simpleFeature")
Run the code above in your browser using DataLab