Top "Factors" questions

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

Why is my Swift loop failing with error "Can't form range with end < start"?

I have a for loop that checks if a number is a factor of a number, then checks if that …

swift for-loop runtime-error factors
In aggregate: sum not meaningful for factors

I am trying something that should be simple, any hint on what is going on is very welcomed. I have …

r aggregate factors
Getting Factors of a Number

I'm trying to refactor this algorithm to make it faster. What would be the first refactoring here for speed? public …

c# performance math factors
Reshape data frame to convert factors into columns in R

I have a data frame where one particular column has a set of specific values (let's say, 1, 2, ..., 23). What I would …

r reshape factors
Find the most frequent value by row

My problem is as follows: I have a data set containing several factor variables, which have the same categories. I …

r count mode factors
Python Pandas: how to turn a DataFrame with "factors" into a design matrix for linear regression?

If memory servies me, in R there is a data type called factor which when used within a DataFrame can …

python dataframe regression factors
Find sum of factors

Why does this code return the sum of factors of a number? In several Project Euler problems, you are asked …

math sum number-theory factors
Linear model with categorical variables in R

I am trying to fit a lineal model with some categorical variables model <- lm(price ~ carat+cut+color+…

r lm factors
Python - Check if numbers in list are factors of a number

I have a list of numbers (integers) (say, from 1 to 10). They're not necessarily consecutive, but they are in ascending order. …

python list python-3.x factors
Print all unique combination of factors of a given number

What is the most efficient algorithm to print all unique combinations of factors of a positive integer. For example if …

java algorithm recursion time-complexity factors