Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How to fill matrix in R using row and column names as arguments without for loops ? For example, there is a matrix rownames(M)
How to fill matrix in R using row and column names as arguments without for loops ?
For example, there is a matrix
rownames(M) <- seq(10, 10.5, by = 0.1) colnames(M) <- seq(40, 43, by = 0.5)
40 40.5 41 41.5 42 42.5 43 10 NA NA NA NA NA NA NA 10.1 NA x NA NA NA NA NA 10.2 NA NA NA NA NA NA NA 10.3 NA NA NA NA NA NA NA 10.4 NA NA NA NA NA NA NA 10.5 NA NA NA NA NA NA NA
which we need to fill with the results of calling function F with row and column names as arguments, like x = F(10.1, 40.5).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started