Search notes:

R function: with

In the following example, with() specifies a data frame on which an expression is executed. Thus, the need to prefix the column-names of the data frame with the name of the data frame is omitted:
df <- data.frame(foo=c(  1,  2,  3),
                 bar=c( 11, 22, 33),
                 baz=c(111,222,333))

sum(df$bar + df$baz)
# 732

with(
  df,
  sum(bar + baz)
)
# 732
Github repository about-r, path: /functions/with/sum.R

See also

Plotting a subset uses with() to select specific values from a data frame and then plot these.
attach()
within()
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...', 1758201003, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/R/functions/with(58): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78