Categories

Nov 14, 2019 in R Language
Q: functions summary with summarise() in R Language

1 Answer

Nov 14, 2019

method

function

code

mean

mean

summarise(df,mean_x1 = mean(x1))

median

median

summarise(df,median_x1 = median(x1))

sum

sum

summarise(df,sum_x1 = sum(x1))

standard deviation

sd

summarise(df,sd_x1 = sd(x1))

interquartile

IQR

summarise(df,interquartile_x1 = IQR(x1))

minimum

min

summarise(df,minimum_x1 = min(x1))

maximum

max

summarise(df,maximum_x1 = max(x1))

quantile

quantile

summarise(df,quantile_x1 = quantile(x1))

first observation

first

summarise(df,first_x1 = first(x1))

last observation

last

summarise(df,last_x1 = last(x1))

nth observation

nth

summarise(df,nth_x1 = nth(x1, 2))

number of occurrence

n

summarise(df,n_x1 = n(x1))

number of distinct occurrence

n_distinct

summarise(df,n_distinct _x1 = n_distinct(x1))
Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

Madanswer
Nov 6, 2019 in R Language
Nov 14, 2019 in R Language
Nov 14, 2019 in R Language
...