About 10,500,000 results
Open links in new tab
  1. Why use as.factor () instead of just factor () - Stack Overflow

    ‘factor(x, exclude = NULL)’ applied to a factor without ‘NA’s is a no-operation unless there are unused levels: in that case, a factor with the reduced level set is returned. ‘as.factor’ coerces …

  2. r - Changing factor levels with dplyr mutate - Stack Overflow

    Jan 28, 2015 · 19 From my understanding, the currently accepted answer only changes the order of the factor levels, not the actual labels (i.e., how the levels of the factor are called). To …

  3. How to force R to use a specified factor level as reference in a ...

    You should do the data processing step outside of the model formula/fitting. When creating the factor from b you can specify the ordering of the levels using factor(b, levels = c(3,1,2,4,5)). Do …

  4. r - list all factor levels of a data.frame - Stack Overflow

    Dec 28, 2014 · with dplyr::glimpse(data) I get more values, but no infos about number/values of factor-levels. Is there an automatic way to get all level informations of all factor vars in a …

  5. when to use factor () when plotting with ggplot in R?

    Feb 25, 2013 · Is the general rule to use factor when the variable being used to determine the shape/size/colour is discrete, and not continuous? Or is there another use of factor in this …

  6. r - How to convert a factor to integer\numeric without loss of ...

    See the Warning section of ?factor: In particular, as.numeric applied to a factor is meaningless, and may happen by implicit coercion. To transform a factor f to approximately its original …

  7. Convert data.frame column format from character to factor

    Dec 6, 2018 · The complete conversion of every character variable to factor usually happens when reading in data, e.g., with stringsAsFactors = TRUE, but this is useful when say, you've …

  8. r - summarizing counts of a factor with dplyr - Stack Overflow

    Sep 12, 2014 · I want to group a data frame by a column (owner) and output a new data frame that has counts of each type of a factor at each observation. The real data frame is fairly large, …

  9. How to reorder factor levels in a tidy way? - Stack Overflow

    Jul 17, 2017 · A couple comments: reordering a factor is modifying a data column. The dplyr command to modify a data column is mutate. All arrange does is re-order rows, this has no …

  10. How to count how many values per level in a given factor?

    Sep 30, 2014 · How to count how many values per level in a given factor? Asked 11 years, 1 month ago Modified 3 years, 8 months ago Viewed 230k times