From bcc27435da63b178b1a223de8fde3303a7968f28 Mon Sep 17 00:00:00 2001 From: justavibedev Date: Fri, 6 Nov 2026 09:13:43 -0800 Subject: [PATCH] Document how to translate R dot formulas to Patsy --- doc/R-comparison.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/R-comparison.rst b/doc/R-comparison.rst index fb5905c3..22bdd967 100644 --- a/doc/R-comparison.rst +++ b/doc/R-comparison.rst @@ -18,6 +18,12 @@ Differences from R: variable transformations, but in Patsy this code is written in Python, not R. +- In R, ``y ~ .`` uses all other columns in the data as predictors. + Patsy requires the predictors to be specified explicitly. For example, + if the data has columns ``y``, ``x1``, and ``x2``, write + ``y ~ x1 + x2`` in Patsy. To choose predictors from column names at + runtime, see :ref:`expert-model-specification`. + - Patsy has no ``%in%``. In R, ``a %in% b`` is identical to ``b:a``. Patsy only supports the ``b:a`` version of this syntax.