I have been trying to remove the line breaks from a data set in R. All the columns are factors hence before i could replace the "\n" with "NA", i need to change the data type from factor to character ...

I have a for loop that checks if a number is a factor of a number, then checks if that factor is prime, and then it adds it to an array. Depending on the original number, I will get an error saying
...

I have a table with some tweets and other table which have 2 columns, one of words and other is category. Column with specific word need to match that specific word with the tweets if it's match then ...

I have a factor finder that I have programmed that is supposed to start by checking if the value entered in the input box is 1 or 0 so it would display "The factor of 1 is 1." or "The factor of 0 is ...

http://www.spoj.com/problems/NDIV/
This is the problem statement. Since i'm new to programming, this particular problem ripped me off, I found this particular code on the internet which when I tried ...

I wish to create a density plot on qplot() comprising three response variables. So the graph will be Density (y) against Elevation (x), with three colour-coded density functions showing how densities ...

I have a dataframe which contains several binary variables, labelled as "0" and "1". I converted these to factors in R after initial import, saved the variables as factors using as.factor(), and saved ...

I have a bunch of means associated with unique values. The unique values are lines that I tested on two different substrates. in R I want to build a loop that will take the unique value and divide the ...

EDITZ: I've figured it out. :) All I had to do was add a .0 to the end of the 100 (and add an int() statement as well). :P Yay for float/decimals!
I'm making a factor calculator. It works perfectly. ...

I am trying to create a program that handles a operators algebra, where the operators don't have a explicit representation.
This implies that I have to define a lot of symbols and parametric functions ...

Merging two data.tables by a common column, where in one data.table the merge column is a factor and in the other it is not creates unexpected results. No warning or error is thrown, and the problem ...

For a project I need to use data from both the COMPUSTAT and CRSP databases (need to construct factors such as fama-french SMB factors). However I have some problems with the CUSIP codes. These codes ...

I'm currently trying to run a logistic regression model to model the
probability of draws in sport. My data contains the home team, away team and
a binary variable indicating whether their match was a ...

I have a small coding issue that I fear is biasing my results
I am running a model with an interaction between two factors. Both factors have a reference category that is theoretically sensible and ...

I have a question on SPSS. At the moment I am writing a research paper at university. I am obliged to write a descriptive research paper.
I am analysing the travel motivation of tourists. Therefore, ...

I have a theoretical range of factors from M1 to M11. In the data M1 to M3 and M5 doesn't exist. How can I ggplot2 barplot with all Ms, not only the existing, so that M1 to M3 and M5 are also shown in ...

So I'm 100% new to programming and although I'm a very fast learner with most things, I am in need of assistance.
I want to find all possible combinations using multiple lists on Python. I know there ...

I am having trouble converting the columns of 2 data frames in a list to numeric. Right now both data frames have 2 columns consisting of factors. I want to convert them to numeric so that I can do ...

I am using the R function cut2 in the library Hmisc. I am giving it a vector of numbers which it then turns into equally sized intervals:
library(Hmisc)
vals = c(100, 1000, 2000, 3000, 40000, 50000, ...