Syntax

R Inspect Structure Syntax

In R, inspect structure: shows types and first values — str(df) head(df)

Quick Answer

Syntax
str(df) head(df)
RSyntax

Inspect Structure

Code example
str(df) head(df)

Shows types and first values.

Learn More

How to inspect structure in R

  1. Open your R file or editor.
  2. Copy the example, then replace its sample names and values for your code.

R Inspect Structure Syntax

Use str(df) head(df).

Related Syntax References

Frequently asked questions

What is the R syntax for inspect structure?

Use this pattern: str(df) head(df)

Can I copy this R code example?

Yes. Use Copy code and adapt the example to your program.

Is this R syntax different on Mac or Windows?

No. The language syntax is the same across operating systems.

Official source · How we verify