Posts by felipe_Milla • 109 points
3 posts
-
2
votes3
answers830
viewsQ: Loop in R with indexing and matrix
We’re trying to use the command for to run a y function (say y=5+3x+4z) varying the values of z (let’s say z is a combination of 5 values z=c(1,2,3,4,5)) and that x is a normal distribution of size…
-
4
votes2
answers97
viewsQ: Subtracting matrices with different arguments
We can subtract two matrices (or two vectors) that were written with different commands? Example: x<-array(1:4,c(4,1,1)) y<-cbind(c(1:4)) x-y "Error> non-conformable objects" This means…
-
4
votes2
answers6494
viewsQ: How to create inverse matrix in R
To get the inverse of an array, we can use different R commands solve(), ginv(), etc, however, when trying to use these commands, an error occurs where we think the problem should be because there…