Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
Please help me with swirl function.
this is what i get and stuck with it
> my_mean <- function(my_vector) {
+ sum(my_vector)/length(my_vector)
+ }
> my_mean(c(2,3,4))
[1] 3
> [save]
> submit()
| Sourcing your script...
| Not quite! Try again.
| Use the sum() function to find the sum of all the numbers in the vector. Use the
| length() function to find the size of the vector.
Hi @leneprd,
I think your requirement is more related to r script, I'd like to suggest you post to R script related forum to get better support.
In addition, you can refer to following link about how to swirl function:
SWIRL – R PROGRAMMING – LESSON 9 – FUNCTIONS
Regards,
Xiaoxin Sheng
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
118 | |
84 | |
49 | |
38 | |
30 |
User | Count |
---|---|
188 | |
76 | |
73 | |
54 | |
45 |