Posts

Showing posts from August, 2023

Week 2: The meaning of myMean()

Image
Hi everyone! For this week's assignment, we were asked to evaluate a given function " myMean ." So far I have learned the R programming language makes use of variables, functions, and comments. We can assign variables with lists of data to be stored for easier use in other functions. In this example, assignment2 is our variable that holds 12 data values. The myMean function returns the mean of the assignment2 data. This is done using the sum function by adding all the values and dividing it by the length function, or adding the number of values. By just retyping myMean with the data source "assignment2" and running the script editor you get the output of 19.25, seen in the R console. This works because the function takes the vector and runs it through the global functions to then return it. A neat trick I utilized is the comments in my code (what starts with #) to do the explanation of this function as well!👇 Check this out in github  ! -Ramya's POV

Git-ing to Intros

Hi everyone! Welcome to my RbyRamya blog where I will post tricks, tips, and everything I learn about the R programming language. Code will be posted on my GitHub repository:  GitHub_rbyramya Introduction to R R is an open source scripting language for statistical analysis. It is an object oriented language that heavily uses functions to complete tasks. Vectors are the fundamental data type in R that assigns alphanumeric data to a variable. One vector can work another through basic operations. You can extract data from a vector using []. When dealing with NA values, set na.rm = TRUE if you want to skip over NA values during calculations. -Ramya's POV