Search notes:

R function: seq_along

seq_along(vec) is equivalent to 1:length(v).
seq_along(4:10)
# [1] 1 2 3 4 5 6 7

seq_along(4)
# [1] 1

# Compare to seq()  -- s.a. http://stackoverflow.com/questions/13732062/seq-vs-seq-along-when-will-using-seq-cause-unintended-results
seq(4:10)
# [1] 1 2 3 4 5 6 7

seq(4)
# [1] 1 2 3 4
Github repository about-r, path: /functions/seq_along.R
Martin Mächler points out that seq_along was created in R 2.9.2 for performance reasons.

See also

seq
Index to (some) R functions

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759406380, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/R/functions/seq_along(58): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78