R has a useful function pairs that provides nice matrix of plots of pairwise connections between variables in a data set. The resulting plot looks similar to the following figure, copied from this blog post:
Is there any ready to use function based on ...

Asked By Boris Gorelik

In R, I am using ccf or acf to compute the pair-wise cross-correlation function so that I can find out which shift gives me the maximum value. From the looks of it, R gives me a normalized sequence of values. Is there something similar in Python's scipy o...

Asked By Legend

In R, I am using ccf or acf to compute the pair-wise cross-correlation function so that I can find out which shift gives me the maximum value. From the looks of it, R gives me a normalized sequence of values. Is there something similar in Python's scipy o...

Asked By Legend

I have a set of 150x150px png images, and a set of (x, y) coordinates that they correspond to. Is there a way to plot the images on a grid? For example, I'm looking for an R or Python solution to create something like the following:

Asked By grautur

In R I can create the desired output by doing:
data = c(rep(1.5, 7), rep(2.5, 2), rep(3.5, 8),
rep(4.5, 3), rep(5.5, 1), rep(6.5, 8))
plot(density(data, bw=0.5))
In python (with matplotlib) the closest I got was with a simple histogram:
im...

Asked By unode

In R I can create the desired output by doing:
data = c(rep(1.5, 7), rep(2.5, 2), rep(3.5, 8),
rep(4.5, 3), rep(5.5, 1), rep(6.5, 8))
plot(density(data, bw=0.5))
In python (with matplotlib) the closest I got was with a simple histogram:
im...

Asked By unode

In R I can create the desired output by doing:
data = c(rep(1.5, 7), rep(2.5, 2), rep(3.5, 8),
rep(4.5, 3), rep(5.5, 1), rep(6.5, 8))
plot(density(data, bw=0.5))
In python (with matplotlib) the closest I got was with a simple histogram:
im...

Asked By unode

I want to use the equivalent of the subset command in R for some Python code I am writing.
Here is my data:
col1 col2 col3 col4 col5
100002 2006 1.1 0.01 6352
100002 2006 1.2 0.84 304518
100002 2006 2 1.52 148219
10000...

Asked By user308827

I have some surface data that is generated by an external program as XYZ values. I want to create the following graphs, using matplotlib:
Surface plot
Contour plot
Contour plot overlayed with a surface plot
I have looked at several examples for plotti...

Asked By morpheous

I have some surface data that is generated by an external program as XYZ values. I want to create the following graphs, using matplotlib:
Surface plot
Contour plot
Contour plot overlayed with a surface plot
I have looked at several examples for plotti...

Asked By morpheous

I have some surface data that is generated by an external program as XYZ values. I want to create the following graphs, using matplotlib:
Surface plot
Contour plot
Contour plot overlayed with a surface plot
I have looked at several examples for plotti...

Asked By morpheous

I recently came across the pandas library for python, which according to this benchmark performs very fast in-memory merges. It's even faster than the data.table package in R (my language of choice for analysis).
Why is pandas so much faster than data.t...

Asked By Zach

I'm brand new to Python (and programming in general) I come from a finance background, so please bear with me. I just started using Python (Enthought's Pylab/Scipy/Numpy) and R for statistical analysis. I'm trying to install rpy2 into Python to integrate ...

Asked By Taj G

I want to use R in Python, as provided by the module Rpy2. I notice that R has very convenient [] operations by which you can extract the specific columns or lines. How could I achieve such a function by Python scripts?
My idea is to create an R vector a...

Asked By ligwin

I want to use R in Python, as provided by the module Rpy2. I notice that R has very convenient [] operations by which you can extract the specific columns or lines. How could I achieve such a function by Python scripts?
My idea is to create an R vector a...

Asked By ligwin

I've used the following code in R to determine how well observed values (20, 20, 0 and 0 for example) fit expected values/ratios (25% for each of the four cases, for example):
> chisq.test(c(20,20,0,0), p=c(0.25, 0.25, 0.25, 0.25))
Chi-squared te...

Asked By SabreWolfy

I am quite new to R, and pretty much used to python. I am not so comfortable writing R code. I am looking for python interface to R, which lets me use R packages in pythonic way.
I have done google research and found few packages which can do that:
Rp...

Asked By darshan

I have a vector with repeated elements, and would like to remove them so that each element appears only once.
In Python I could construct a Set from a vector to achieve this, but how can I do this in R?

Asked By ashim

I am looking for advice on plotting vectors in the cartesian plane. The task is to plot points (coordinates) and then to link them with an arrow to some source point (say 0,0). The image below should give an idea. I don't care about colours and naming vec...

Asked By sim

I want to make the equivalent of a python dict in R. Basically, in python I have:
visited = {}
if atom_count not in visited:
Do stuff
visited[atom_count] = 1
The idea is, if I saw that specific, atom_count, I have visited[atom_count] = 1. Thus, if...

Asked By user1357015