Buenos días. Soy nueva en esto de Phyton, códigos, programación, etc. Al ejecutar el código para añadir la carpeta MyDrive/r-lib a la ruta donde se buscan las bibliotecas me dio error porque la carpeta no se llama r-lib sino r-lib_ed2024. Si cambio el código y pongo ese nombre de carpeta (r-lib_ed2024) sí me funciona y me sale la misma respuesta que en el Notebook.
El problema es que ya en el siguiente código:
"%%R
library(TCGAbiolinks)
library(SummarizedExperiment)
print(sessionInfo())"
me da el siguiente error:
" Error: package or namespace load failed for ‘TCGAbiolinks’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘munsell’
---------------------------------------------------------------------------
RRuntimeError Traceback (most recent call last)
/usr/local/lib/python3.12/dist-packages/rpy2/ipython/rmagic.py in eval(self, code)
406 r_expr = ri.parse(code)
--> 407 value, visible = ri.evalr_expr_with_visible(
408 r_expr
7 frames/usr/local/lib/python3.12/dist-packages/rpy2/rinterface.py in evalr_expr_with_visible(expr, envir)
193 if error_occured[0]:
--> 194 raise embedded.RRuntimeError(_rinterface._geterrmessage())
195 res = conversion._cdata_to_rinterface(r_res)
RRuntimeError: Error: package or namespace load failed for ‘TCGAbiolinks’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘munsell’
During handling of the above exception, another exception occurred:
RInterpreterError Traceback (most recent call last)
/tmp/ipykernel_610/4057727362.py in ()
----> 1 get_ipython().run_cell_magic('R', '', 'library(TCGAbiolinks)\nlibrary(SummarizedExperiment)\nprint(sessionInfo())\n')
/usr/local/lib/python3.12/dist-packages/google/colab/_shell.py in run_cell_magic(self, magic_name, line, cell)
221 if line and not cell:
222 cell = ' '
--> 223 return super().run_cell_magic(magic_name, line, cell)
224
225
/usr/local/lib/python3.12/dist-packages/IPython/core/interactiveshell.py in run_cell_magic(self, magic_name, line, cell)
2471 with self.builtin_trap:
2472 args = (magic_arg_s, cell)
-> 2473 result = fn(*args, **kwargs)
2474 return result
2475
in R(self, line, cell, local_ns)
/usr/local/lib/python3.12/dist-packages/IPython/core/magic.py in (f, *a, **k)
185 # but it's overkill for just that one bit of state.
186 def magic_deco(arg):
--> 187 call = lambda f, *a, **k: f(*a, **k)
188
189 if callable(arg):
/usr/local/lib/python3.12/dist-packages/rpy2/ipython/rmagic.py in R(self, line, cell, local_ns)
982 if not e.stdout.endswith(e.err):
983 print(e.err)
--> 984 raise e
985 finally:
986 if self.device in DEVICES_STATIC:
/usr/local/lib/python3.12/dist-packages/rpy2/ipython/rmagic.py in R(self, line, cell, local_ns)
947 return_output = False
948 else:
--> 949 text_result, result, visible = self.eval(code)
950 text_output += text_result
951 if visible:
/usr/local/lib/python3.12/dist-packages/rpy2/ipython/rmagic.py in eval(self, code)
411 # Otherwise next return seems to have copy of error.
412 warning_or_other_msg = self.flush()
--> 413 raise RInterpreterError(code, str(exception),
414 warning_or_other_msg)
415 finally:
RInterpreterError: Failed to parse and evaluate line 'library(TCGAbiolinks)\nlibrary(SummarizedExperiment)\nprint(sessionInfo())\n'.
R error message: 'Error: package or namespace load failed for ‘TCGAbiolinks’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):\n there is no package called ‘munsell’' ".
Y aquí ya me pierdo jajaja. ¿Esto ocurre porque no hay una carpeta llamada "Munsell", pero el resto de bibliotecas sí están presentes y podré continuar con el Notebook?
Agradezco por adelantado la ayuda.
Un saludo,
Zaira G.