python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
How do I remove observations from the first level of a variable?
I have a factor variable movieFac and I'm trying to remove these 38 observations at the beginning and recreate the variable without them. I've been trying drop levels, but haven't had any success.
mov...
redwoods
Votes: 0
Answers: 0
is there a simple way to recode levels of a factor variable so that levels occuring below a given frequency are recoded to "other"
theshold <- c(0.001, 0.5, 0.1)
df$a df$b df$c - Recode levels based on level frequency of less than first threshold
df$x df$y df$x - Recode levels based on level frequency of less than second thres...
Damien Conway
Votes: 0
Answers: 3
Aggregate by multiple groups and keep the result for each level in R
Is there any possibility to get expected result in simplest way (without intermediate steps, as I did in my code)?
I was looking for it and couldn't find any solution...
So, for example:
df <- data...
Mateusz
Votes: 0
Answers: 1
How do I drop some categorical variables from a plot in R?
So, I have this scatterplot:
data(infmort, package = "faraway")
summary(infmort)
#install.packages("ggplot2")
library(ggplot2)
#levels(infmort$region)
# Levels are : 1) Africa, 2)...
Heidi Meier
Votes: 0
Answers: 2