Explore

Find agent skills by outcome

20,335 skills indexed with the new KISS metadata standard.

Showing 24 of 20,335Categories: Education, Coding & Debugging, Data, Creative
Creative
PromptBeginner5 minmarkdown

- `aov` is a wrapper around `lm` that stores extra info for balanced ANOVA. For unbalanced designs

Type I SS (sequential) are computed — order of terms matters.

0
Creative
PromptBeginner5 minmarkdown

- `model.matrix` creates the design matrix including dummy coding. Default contrasts: `contr.treatment` for unordered factors

`contr.poly` for ordered.

0
Coding & Debugging
PromptBeginner5 minmarkdown

- `URLencode(url

reserved = FALSE)` by default does NOT encode reserved chars (`/`

0
Creative
PromptBeginner5 minmarkdown

- `substr(x

start

0
Data
PromptBeginner5 minmarkdown

- Returns data frame with `size`

`isdir`

0
Data
PromptBeginner5 minmarkdown

- If FUN returns multiple values

result column is a **matrix column** inside the data frame.

0
Data
PromptBeginner5 minmarkdown

- Formula interface (`aggregate(y ~ x

data

0
Coding & Debugging
PromptBeginner5 minmarkdown

- `as.numeric(f)` returns **integer codes**

not original values. Use `as.numeric(levels(f))[f]` or `as.numeric(as.character(f))`.

0
Data
PromptBeginner5 minmarkdown

- For data frames

operates on whole rows. For lists

0
Data
PromptBeginner5 minmarkdown

- `rbind` on data frames matches columns **by name**

not position. Missing columns get `NA`.

0
Data
PromptBeginner5 minmarkdown

- Result is always an **array** (even 1D)

class table. Convert to data frame with `as.data.frame(tbl)`.

0
Data
PromptBeginner5 minmarkdown

- `cbind` on data frames calls `data.frame(...)`

not `cbind.matrix`. Mixing matrices and data frames can give unexpected results.

0
Data
PromptBeginner5 minmarkdown

- Default `by` is `intersect(names(x)

names(y))` — can silently merge on unintended columns if data frames share column names.

0
Data
PromptBeginner5 minmarkdown

- Returns an **array** (not a data frame). Class info on return values is **discarded** (e.g.

Date objects become numeric).

0
Data
PromptBeginner5 minmarkdown

- On a **data frame**

`apply` coerces to matrix via `as.matrix` first — mixed types become character.

0
Data
PromptBeginner5 minmarkdown

- Matrix indexing a data frame (`df[cbind(i

j)]`) coerces to matrix first — avoid.

0
Data
PromptBeginner5 minmarkdown

- Data frame `[` with single column: `df[

1]` returns a **vector** (drop=TRUE default for columns)

0
Data
PromptBeginner5 minmarkdown

- `subset` argument uses **non-standard evaluation** — column names are resolved in the data frame

which can silently pick up wrong variables in programmatic use. Use `[` with explicit logic in functions.

0
Coding & Debugging
PromptBeginner5 minmarkdown

- Factor indexing: `x[f]` uses integer codes of factor `f`

not its character labels. Use `x[as.character(f)]` for label-based indexing.

0
Data
PromptBeginner5 minmarkdown

- `ts(data

start

0
Data
PromptBeginner5 minmarkdown

- `relist(flesh

skeleton)` — `flesh` is the flat data

0
Creative
PromptBeginner5 minmarkdown

- `tryCatch(expr

warning = function(w) {...})` catches the **first** warning and exits. Use `withCallingHandlers` + `invokeRestart(muffleWarning)` to suppress warnings but continue.

0
Creative
PromptBeginner5 minmarkdown

- `Reduce` with `init` adds a starting value: `Reduce(f

x

0
Data
PromptBeginner5 minmarkdown

- Useful pattern: `do.call(rbind

list_of_dfs)` to combine a list of data frames.

0