method
function
code
mean
summarise(df,mean_x1 = mean(x1))
median
summarise(df,median_x1 = median(x1))
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
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))