64
votes
12answers
11k views

How can I build a model to distinguish tweets about Apple (Inc.) from tweets about apple (fruit)?

See below for 50 tweets about "apple." I have hand labeled the positive matches about Apple Inc. They are marked as 1 below. Here are a couple of lines: 1|“@chrisgilmer: Apple targets big business ...
0
votes
1answer
31 views

R_HOME Error with rpy2

I know there are quite a few posts on getting up and running with rpy2 on windows 7 32 bit. I have referenced a good number of them and attempted their solutions, including the use of PypeR. I dont ...
1
vote
2answers
188 views

rpy2 / R issue in loess function via Python?

I'm trying to call the R function loess via Rpy2 in Python on this datafile: http://filebin.ca/azuz9Piv0z8/test.data It works when I use a subset of the data (the first 1000 points) but when I try to ...
0
votes
0answers
25 views

R Package MSwM rpy2 issue in python

r.assign('A',A) # ship local u to R r.assign('a',a) # ship local v to R r('lmout <- lm(A~a)') # run the regression markov = ro.packages.importr('MSwM') z = markov.msmFit(r('lmout <- ...
0
votes
1answer
23 views

How to get a normalized fractional count in ggplot2 via rpy2 in Python?

I'd like to make a density plot in rpy2 (using ggplot2) that has y-values representing fractional counts, such that the y axis can be interpreted as "fraction of data points" that have a particular ...
0
votes
0answers
24 views

using ggplot2 interactively from rpy2 in python?

I tried following this script for interactively using ggplot2 through rpy2 from within ipython: http://nbviewer.ipython.org/5180089 When I try it in ipython 0.13.2, I get this error: IPython 0.13.2 ...
5
votes
1answer
172 views

Avoid antialising of R plots in iPython Notebook

In iPython Notebook (with rmagic extension) the plots don't look crisp. They are antialised. I have tried different combinations of width and height for example %R -w 600 -h 400 plot(1) without ...
0
votes
1answer
46 views

rpy2 not working after upgrading R to 3.0.1

I have had a python script that uses rpy2 internally. This script was working until very recently. However, it stopped working now. I got an error that I had not seen previously. I can reproduce ...
15
votes
3answers
459 views

Is there an R equivalent of the pythonic “if __name__ == ”__main__“: main()”?

The objective is to have two simple ways to source some code, say func.R, containing a function. Calling R CMD BATCH func.R initializes the function and evaluates is. Within a session, issuing ...
5
votes
6answers
794 views

How do I convert the three letter amino acid codes to one letter code with python or R?

I have a fasta file as shown below. I would like to convert the three letter codes to one letter code. How can I do this with python or R? >2ppo ARGHISLEULEULYS >3oot METHISARGARGMET desired ...
0
votes
0answers
34 views

Error Package Fit AR “ variable lengths differ”

RES = &ltclass 'pandas.core.frame.DataFrame'&gt DatetimeIndex: 1626 entries, 2007-01-04 00:00:00 to 2013-06-19 00:00:00 Data columns (total 2 columns): const 1626 non-null values Res ...
0
votes
1answer
52 views

locally weighted logistic regression package / implementation

I want to implement or use a package for locally weighted logistic regression. I was wondering if there is a package in Python or R or anything like Wabbit?
0
votes
1answer
151 views

data munging in python compared with R (from an excel sheet)

I have a hypothetical example here with file attached (Excel File Link) where I'm loading in a file from excel and formatting it into something I can work with to either analyse or store more ...
6
votes
1answer
682 views

python(or numpy) equivalent of match in R

Is there any easy way in python to accomplish what the match function does in R? what match in R does is that it returns a vector of the positions of (first) matches of its first argument in its ...
5
votes
0answers
199 views

What packages and features in R would I miss if I developed data science / quantitative reporting systems in Python instead? [closed]

I am intermediate in R and a beginner in Python. However my core abilities lie less in data analysis and more in programming and developing large software systems in teams, and I don't have time to ...

1 2 3 4 5 29
15 30 50 per page