From b9a3939de655a59983a9028f908aedb90afefe6c Mon Sep 17 00:00:00 2001 From: Alex Wolf Date: Thu, 21 Nov 2024 23:20:31 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Adapt=20R=20quickstart=20to=20la?= =?UTF-8?q?minr=200.2.0=20(#186)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 📝 Fix R quickstart * 📝 Polish * 💄 More polish * 💚 Fix --- docs/introduction.ipynb | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/docs/introduction.ipynb b/docs/introduction.ipynb index 0654ffd3..ede5ac53 100644 --- a/docs/introduction.ipynb +++ b/docs/introduction.ipynb @@ -64,11 +64,11 @@ "import lamindb as ln\n", "\t\n", "ln.track() # track a run for a notebook or script \n", - "artifact = ln.Artifact.get(\"3TNCsZZcnIBv2WGb0001\") # get an artifact record\n", + "artifact = ln.Artifact.get(\"3TNCsZZcnIBv2WGb0001\") # get an artifact record by uid\n", "artifact.describe() # show metadata of artifact\n", - "df = artifact.load() # load artifact into memory, e.g., a DataFrame\n", + "df = artifact.load() # load the artifact into memory, e.g., a DataFrame\n", "\n", - "# work with the dataset\n", + "# do your work\n", "\n", "ln.Artifact(\"./my_result_folder\", description=\"My result\").save() # save a folder\n", "ln.finish() # mark the run as finished\n", @@ -77,25 +77,29 @@ ":::{tab-item} R\n", "\n", "```R\n", - "install.packages(\"laminr\") # install the R package\n", + "# laminr needs pip install 'lamindb[aws]'\n", + "install.packages(\"laminr\", dependencies = TRUE) # install the laminr package\n", "library(laminr)\n", "\n", - "ln <- connect()\n", - "# ln$track() # soon\n", - "artifact <- ln$Artifact$get(\"KBW89Mf7IGcekja2hADu\")\n", - "adata <- artifact$load() # load the dataset into memory\n", + "db <- connect() # connect to the instance you configured on the terminal\n", + "db$track(path = \"./my-analysis.Rmd\") # track a run of your notebook or script\n", + "artifact <- db$Artifact$get(\"3TNCsZZcnIBv2WGb0001\") # get an artifact record by uid\n", + "df <- artifact$load() # load the artifact into memory, e.g., a DataFrame\n", "\n", - "# work with the dataset\n", + "# do your work\n", "\n", - "# ln$Artifact(\"./my_result_folder\", description=\"My result\").save()\n", - "# ln$finish() # soon\n", + "db$Artifact(\"./my_result_folder\", description=\"My result\").save() # save a folder\n", + "db$finish() # mark the run finished\n", "```\n", "\n", "Save an html export for `.qmd` or `.Rmd` file as a report.\n", "\n", "```shell\n", - "lamin save my-analysis.qmd\n", + "lamin save my-analysis.Rmd\n", "```\n", + "\n", + "For more, see the [R docs](https://laminr.lamin.ai/).\n", + "\n", ":::\n", "::::" ] @@ -1244,7 +1248,7 @@ ], "metadata": { "kernelspec": { - "display_name": "lamindb", + "display_name": "py310", "language": "python", "name": "python3" }, @@ -1258,7 +1262,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.7" + "version": "3.10.15" } }, "nbformat": 4,