R prop.table() Function

R prop.table() Function

The prop.table() function in R calculates the proportion or relative frequency of values in a contingency table. It calculates the value of each cell in a table as a proportion of all values. For example, let’s say you have a table with a total of 5 elements like this: table(c(“A”, “B”, “C”, “D”, “E”)). Each value … Read more

R split() Function: Splitting a Data

R split() Function

The split() function divides the input data into groups based on some criteria, typically specified by one or more grouping factors. The split() function always returns a list, with elements named after the levels of the factor and does not modify the original data. In the above figure, we split the data frame by the … Read more

R View() Function

R View() Function

The View() is a utility function in R that invokes a more intuitive spreadsheet-style data viewer on a matrix-like R object. View() does not print output in the console or return a value — it is a side-effect function that launches a separate data viewer window. It is ideal for quickly checking data contents, identifying patterns, or … Read more