Yes, but <- is preferred. Note, there are also some differences. You can do the following:
> a <- 10 > b = 10 > identical(a,b) [1] TRUE And you can also do > myFun <- function(x, y = 100){ + result <- x*y + result} > myFun(x = 20) [1] 2000 But, you cannot use '<-' to define the arguments of a function > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of km > Sent: Wednesday, November 03, 2010 2:05 PM > To: r-help@r-project.org > Subject: [R] '=' vs '<-' > > Hi all, > > can we use '=' instead of '<-' operator for assignment in R programs? > > regards, > KM > > ______________________________________________ > 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.