Las diapositivas de mi charla Birds of the same feather… en el grupo de usuarios de R de Madrid pueden verse/bajarse de aquí.
Sí, hablaré de feather.
Los detalles, aquí.
Supongo que a estas alturas todos conoceréis feather y rPython. Hoy los vais a ver trabajar juntos.
Primero solo en R:
library(feather) path <- "/tmp/my_data.feather" write_feather(cars, path) my_cars <- read_feather(path) Ahora, para pasarle datos a Python:
library(rPython) python.exec("import feather") python.exec("a = feather.read_dataframe('/tmp/my_data.feather')") python.exec("print a") Y, finalmente, para crear datos grandes en Python y devolvéselos a R:
python.exec("import numpy as np") python.exec("import pandas as pd") python.exec("arr = np.random.randn(10000000)") python.exec("arr[::10] = np.nan") python.