Reputation: 21
I have now been trying different solutions and ways for a long time. Could somebody please help me understand how i could implement this sum calculation in R?
I also want save the result of that calculation to a vector called sumOne
.
Upvotes: 1
Views: 198
Reputation: 887108
We can use vectorized option in R
sum(v1^3 + 4 * v1^2)
[1] 37687400
v1 <- 10:109
Upvotes: 2