# Getting started
This page explains the structure and configuration options available when using the Palantir R SDK to write data transformations in Foundry.
## Repository structure
Each R transform is defined and configured by a transforms spec, with the definition written in YAML format and saved in the `.transforms` folder. The full content of the repo project will be available at runtime and can be used for the transform.
```
.
├── .transforms
| └── happiness_ranking.yml
|
├── project
| └── src
| └── top_10.R
└── .Rprofile
```
For R transforms published from [Code Workspaces](../../code-workspaces/overview/index.md), transform spec files are rendered and configurable via the UI.
## Write and configure a simple R transform
In the example below, we write a simple data transformation that reads a tabular dataset, applies a filter using the R package `dplyr`, and produces an output dataset with the filtered result.
```R
library(foundry)
library(dplyr)
happiness_2019 <- datasets.read_table("happiness_2019")
top_10 <- happiness_2019 %>% filter(Overall_rank <= 10)
datasets.write_table(top_10, "top_10_happiest_countries")
```
Here, we have the corresponding transform spec file that contains the definition of the transform:
Replace the `dataset.rid` fields with the dataset RID of your input and output datasets. Output datasets must first be created manually, as we do not currently support creating new output datasets during checks time.
You can add additional inputs and outputs by adding a new item to the `inputs` or `outputs` list.
```yaml
inputs:
- alias: "happiness_2019"
properties:
type: "dataset"
dataset:
rid: ""
outputs:
- alias: "top_10_happiest_countries"
properties:
type: "dataset"
dataset:
rid: "