gws_core

Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version

R conda env agent

TASK
Typing name :  TASK.gws_core.RCondaAgent Brick :  gws_core

Agent to run R snippets in conda a shell environment.

Conda-based R agents allow to execute R snippets on the fly in isolated conda environments.

Agents are fast and efficient tools to develop, test, use and share code snippets.

Warning: It is recommended to use code snippets comming from trusted sources.

Here is the general documentation for agent: https://constellab.community/bricks/gws_core/latest/doc/developer-guide/agent/getting-started/69820653-52e0-41ba-a5f3-4d9d54561779

Here is the documentation of the agent: https://constellab.community/bricks/gws_core/latest/doc/developer-guide/agent/env-agent/c6acb3c3-2a7c-44cd-8fb2-ea1beccdbdcc

Use the parameter 'Log output to task' to enable print messages (like print, logging, etc.) to be logged in the task log. This is useful to debug your code and see the output of your code.

Input

File or folder
Optional

Output

File or folder

Configuration

params

Optional

Type : dynamicDefault value : [object Object]

env

Optional

YAML configuration of the R conda environment

Type : yaml_code_paramDefault value : name: .venv channels: - conda-forge dependencies: - r-base

code

Optional

The R code snippet to execute using shell command

Type : r_code_paramDefault value : # This is a snippet template for a R agent. # Read the source csv file with header, row names and comma separator csv <- read.csv(source_paths[1], header = TRUE, sep = ",", row.names = 1) # Transpose the table, keep the header csv_result <- t(csv) # Write the csv file into the result folder result_path <- "result.csv" write.csv(csv_result, file = result_path, row.names = TRUE, col.names = TRUE) target_paths <- c(result_path)

log_stdout

Optional Advanced parameter

Log the output of the code snippet to the task log

Type : bool