How to mount google drive to R notebook in colab?

前端 未结 3 1812
慢半拍i
慢半拍i 2021-01-04 23:11

I have an R notebook in colab where I want to read a file which is saved in my google drive.

I only seem to find python code such as \"from google.colab import driv

3条回答
  •  春和景丽
    2021-01-04 23:57

    It seems there is no mechanism as of now to mount google drive in colab notebook with R kernel. Although a workaround can be used to have google drive mounted normally as in pyhton kernel and use both python and r based on the needs. See this answer which explains how r and python can be run together.

    # activate R magic
    %load_ext rpy2.ipython
    
    %%R
    x <- 42
    print(x)
    

提交回复
热议问题