About 8,510,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. 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 …

  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. Drop unused factor levels in a subsetted data frame

    I have a data frame containing a factor. When I create a subset of this dataframe using subset or another indexing function, a new data frame is created. However, the factor variable retains all …

  5. factor () command in R is for categorical variables with hierarchy ...

    Oct 19, 2012 · Various factor-handling R functions (the "methods and model-fitting functions" of the second part of that quote) will then use is.ordered() to test for the presence of that …

  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. r - Re-ordering factor levels in data frame - Stack Overflow

    Aug 24, 2013 · Re-ordering factor levels in data frame [duplicate] Asked 12 years, 2 months ago Modified 4 years, 2 months ago Viewed 254k times

  8. 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 …

  9. 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 …

  10. r - Safely merge data frames by factor columns - Stack Overflow

    May 22, 2014 · Factors can help preventing some kinds of programming errors in R: You cannot perform equality check for factors that use different levels, and you are warned when …