On Tue, Aug 7, 2012 at 11:26 AM, hafida <hafida...@hotmail.fr> wrote: > Hi > >>i have aproblem withe execution of my function > >>first, i wrote my function in the script of R >>nom_fonction <- function(arg1[=expr1], arg2[=expr2], ...){ > bloc d'instructions > } > >> when i want to have the result i mean the laste instruction in the bloc of >> instruction , i try to >>wrote the name of function > >>source(aj.fun) > Error in readLines(file, warn = FALSE) : 'con' is not a connection
source() takes a file name, not a function name. Cheers, Michael > >>return(aj.fun) > Error: no function to return from, jumping to top level Don't use return() outside of functions. > > thanks for helping > hafida, univ of algeria > > > > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/Execution-of-a-function-tp4639424.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.