Explore

Find agent skills by outcome

118,410 skills indexed with the new KISS metadata standard.

Showing 24 of 118,410Categories: Research & Learning, Data, Coding & Debugging, Creative, General
General
PromptBeginner5 minmarkdown

- `modifyList(x

val)` replaces elements of list `x` with those in `val` by **name**.

0
General
PromptBeginner5 minmarkdown

- `FUN` argument applies a function to each combination: `combn(5

3

0
General
PromptBeginner5 minmarkdown

- Checks attributes

names

0
General
PromptBeginner5 minmarkdown

- `combn(n

m)` or `combn(x

0
General
PromptBeginner5 minmarkdown

- Returns `TRUE` or a **character string** describing the difference — NOT `FALSE`. Use `isTRUE(all.equal(x

y))` in conditionals.

0
General
PromptBeginner5 minmarkdown

- Custom conditions: `stop(errorCondition(msg

class = myError))` then catch with `tryCatch(...

0
General
PromptBeginner5 minmarkdown

- Tests **near equality** with tolerance (default `1.5e-8`

i.e.

0
General
PromptBeginner5 minmarkdown

- `tryCatch(expr

error = function(e) e)` returns the error condition object.

0
General
PromptBeginner5 minmarkdown

- `tryCatch` **unwinds** the call stack — handler runs in the calling environment

not where the error occurred. Cannot resume execution.

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
General
PromptBeginner5 minmarkdown

- `lengths(x)` returns the length of **each element** of a list. Equivalent to `sapply(x

length)` but faster (implemented in C).

0
General
PromptBeginner5 minmarkdown

- `Find(f

x)` returns the **first** element where `f(elem)` is `TRUE`. `Find(f

0
General
PromptBeginner5 minmarkdown

- `Position(f

x)` returns the **index** of the first match (like `Find` but returns position

0
General
PromptBeginner5 minmarkdown

- `Map(f

...)` is a simple wrapper for `mapply(f

0
Creative
PromptBeginner5 minmarkdown

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

x

0
General
PromptBeginner5 minmarkdown

- `Filter(f

x)` keeps elements where `f(elem)` is `TRUE`. Unlike `x[sapply(x

0
General
PromptBeginner5 minmarkdown

- `Reduce(f

x

0
General
PromptBeginner5 minmarkdown

- `Reduce(f

x

0
General
PromptBeginner5 minmarkdown

- `Reduce(f

x)` applies binary function `f` cumulatively: `Reduce(+

0
Data
PromptBeginner5 minmarkdown

- Useful pattern: `do.call(rbind

list_of_dfs)` to combine a list of data frames.

0
General
PromptBeginner5 minmarkdown

- `do.call(fun

args_list)` — `args` must be a **list**

0
General
PromptBeginner5 minmarkdown

> Non-obvious behaviors

gotchas

0
General
PromptBeginner5 minmarkdown

- `with(df

expr)` avoids repeating `df$` everywhere

0
General
PromptBeginner5 minmarkdown

- Use `stop()`

`warning()`

0