Skip to content
Back to skills

Tsna

ASecurity

R tsna package for temporal network analysis. Use for analyzing temporal paths and metrics in dynamic networks.

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added June 4, 2026
data

Security analysis

A100/100

Scanned June 4, 2026

npx -y skills add LeoLin990405/r-analytics-skill --skill tsna --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tsna?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tsna
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/leolin990405-tsna/badge)](https://www.skillsdirectory.com/skills/leolin990405-tsna)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tsna
description: R tsna package for temporal network analysis. Use for analyzing temporal paths and metrics in dynamic networks.
---

# tsna

Tools for temporal social network analysis.

## Temporal Paths

```r
library(tsna)

# Forward reachable set
tPath(dnet, v = 1, direction = "fwd",
  start = 0, end = 10)

# Backward reachable set
tPath(dnet, v = 1, direction = "bkwd",
  start = 0, end = 10)

# Geodesic distance
tPath(dnet, v = 1, type = "geodesic")
```

## Reachability

```r
# Forward reachability
reach_fwd <- tReach(dnet, direction = "fwd")

# Backward reachability
reach_bkwd <- tReach(dnet, direction = "bkwd")

# Reachability matrix
tReach(dnet, graph = TRUE)
```

## Temporal Metrics

```r
# Temporal degree
tDegree(dnet)

# At specific time
tDegree(dnet, at = 5)

# Over interval
tDegree(dnet, start = 0, end = 10)
```

## SNA Statistics Over Time

```r
# Apply SNA function over time
tSnaStats(dnet, snafun = "betweenness")
tSnaStats(dnet, snafun = "closeness")
tSnaStats(dnet, snafun = "degree")

# Custom function
tSnaStats(dnet, snafun = function(x) {
  mean(degree(x))
})
```

## Edge Duration

```r
# Edge durations
edgeDuration(dnet)

# Mean duration
mean(edgeDuration(dnet))
```

## Vertex Activity

```r
# Vertex activity duration
vertexDuration(dnet)
```

## Transmission Trees

```r
# Infection/transmission tree
tree <- tPath(dnet, v = 1, direction = "fwd",
  type = "earliest.arrive")

# Plot tree
plot(tree)
```

## Temporal Correlation

```r
# Correlation between time slices
tCorrelate(dnet, lag = 1)
```

## Aggregation

```r
# Aggregate over time windows
tErgmStats(dnet,
  formula = ~ edges + mutual,
  start = 0, end = 10,
  time.interval = 1)
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.