Create factor.R