AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

R Style Guide

skill-ab604-claude-code-r-skills-r-style-guide · by ab604

R style guide covering naming conventions, spacing, layout, and function design best practices. Use when writing R code.

No reviews yet
0 installs
3 views
0.0% view→install

Install

$ agentstack add skill-ab604-claude-code-r-skills-r-style-guide

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-ab604-claude-code-r-skills-r-style-guide)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of R Style Guide? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

R Style Guide & Function Writing Best Practices

Consistent naming, spacing, structure, and function design for R code

Function Writing Best Practices

Structure and Style

# Good function structure
rescale01 
  filter(year >= 2020) |>
  group_by(category) |>
  summarise(
    mean_value = mean(value),
    count = n()
  )

Assignment

# Good - Use 
  filter(year >= 2020) |>
  mutate(
    new_var = old_var * 2,
    another_var = str_to_lower(text_var)
  ) |>
  summarise(
    mean_value = mean(value),
    .by = category
  )

Comments

# Good - Comments explain WHY, not WHAT
# Calculate running average to smooth noise in sensor data
running_avg  0) {
    stop("Missing columns: ", paste(missing, collapse = ", "))
  }
}

# Avoid - Function does too many things
do_everything = {threshold}.",
      x = "{sum(x = min_value)
  }
  if (!is.null(max_value)) {
    data 
    filter({{ var }} > threshold)
}

# Usage
data |> my_transform(value, threshold = 0.8)

Prefixed Non-Standard Arguments

# Good - Prefix with . to avoid conflicts
group_summary 
    summarise(..., .by = {{ .by }})
}

Consistent Return Types

# Good - Always return tibble
my_function 
    # processing...
    filter(!is.na(value))

  tibble::as_tibble(result)
}

Common Style Mistakes

Avoid These Patterns

# Avoid - Inconsistent spacing
x 0)) {}  # Extra parens
if (x > 0) {}    # Correct

# Avoid - Using T/F instead of TRUE/FALSE
if (x == T) {}     # T can be overwritten
if (x == TRUE) {}  # Correct

# Avoid - Semicolons to separate statements
x  pull(mpg) |> mean()

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.