Skip to content

Commit ca774a3

Browse files
committed
♻️ Adapt the R quickstart to laminr 1.0
1 parent 44c2f46 commit ca774a3

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

docs/introduction.ipynb

+7-6
Original file line numberDiff line numberDiff line change
@@ -91,19 +91,20 @@
9191
":::{tab-item} R\n",
9292
"\n",
9393
"```R\n",
94-
"# laminr needs pip install 'lamindb'\n",
9594
"install.packages(\"laminr\", dependencies = TRUE) # install the laminr package from CRAN\n",
95+
"laminr::install_lamindb() # install lamindb for usage via reticulate\n",
96+
"laminr::lamin_connect(\"<account>/<instance>\") # <-- replace with your instance\n",
9697
"library(laminr)\n",
9798
"\n",
98-
"db <- connect() # connect to the instance you configured on the terminal\n",
99-
"db$track() # track a run of your notebook or script\n",
100-
"artifact <- db$Artifact$get(\"3TNCsZZcnIBv2WGb0001\") # get an artifact by uid\n",
99+
"ln <- import_module(\"lamindb\")\n",
100+
"ln$track() # track a run of your notebook or script\n",
101+
"artifact <- ln$Artifact$get(\"3TNCsZZcnIBv2WGb0001\") # get an artifact by uid\n",
101102
"filepath <- artifact$cache() # cache the artifact on disk\n",
102103
"\n",
103104
"# do your work\n",
104105
"\n",
105-
"db$Artifact.from_path(\"./my_dataset.csv\", key=\"my_results/my_dataset.csv\").save() # save a folder\n",
106-
"db$finish() # mark the run finished\n",
106+
"ln$Artifact(\"./my_dataset.csv\", key=\"my_results/my_dataset.csv\").save() # save a folder\n",
107+
"ln$finish() # mark the run finished\n",
107108
"```\n",
108109
"\n",
109110
"Depending on whether you ran RStudio's notebook mode, you may need to save an html export for `.qmd` or `.Rmd` file via the command-line.\n",

0 commit comments

Comments
 (0)