Top "Factors" questions

A number a is a factor of a number b if a divides b exactly.

R * not meaningful for factors ERROR

I have the following data.frame and I want to perform some calculations on the 2nd column. > test code …

r factors
Mean by factor by level

Maybe this is simple but I can't find answer on web. I have problem with mean calculation by factors by …

r mean levels factors
Finding factors of a given integer

I have something like this down: int f = 120; for(int ff = 1; ff <= f; ff++){ while (f % ff != 0){ } Is there …

java for-loop integer while-loop factors
Algorithm to find all the exact divisors of a given integer

I want to find all the exact divisors of a number. Currently I have this: { int n; int i=2; scanf("%…

c algorithm numbers performance factors
Basic - T-Test -> Grouping Factor Must have Exactly 2 Levels

I am relatively new to R. For my assignment I have to start by conducting a T-Test by looking at …

r grouping factors
Remove unused factor levels from a ggplot bar plot

I want to do the opposite of this question, and sort of the opposite of this question, though that's about …

r plot ggplot2 factors
Segmented Sieve of Eratosthenes?

It's easy enough to make a simple sieve: for (int i=2; i<=N; i++){ if (sieve[i]==0){ cout <&…

algorithm primes sieve-of-eratosthenes prime-factoring factors
What is the fastest algorithm to calculate all factors of an integer number?

I have written this block of code but it is consuming lots of time to calculate... Can you help me …

c algorithm numbers factors
Recode categorical factor with N categories into N binary columns

Original data frame: v1 = sample(letters[1:3], 10, replace=TRUE) v2 = sample(letters[1:3], 10, replace=TRUE) df = data.frame(v1,v2) df v1 …

r dataframe factors
nᵗʰ ugly number

Numbers whose only prime factors are 2, 3, or 5 are called ugly numbers. Example: 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, ... 1 can be considered as 2^0. I am working on …

algorithm math primes factors hamming-numbers