Dear group,
I have this command line in a function:
zz<-merge(transform(merge(value,allcon,all.y=T),SHORTDESCRIPTION=NULL,VALUENULL,PL=-VALUE*pl,quantity=NULL),PosB,all.x=T,sort=F)
I want to cut it in 2 lines (just for convenient purpose). Here is what I
did :
zz<-merge(transform(merge(value,allcon,all.y=T),SHORTDESCRIPTION=NULL,
+ VALUE=NULL,PL=-VALUE*pl,quantity=NULL),PosB,all.x=T,sort=F)
But when I source the function, I get an error message:
Error in source("C:\\Users\\arno\\Documents\\r\\LSC\\PLwork2.r") :
C:\Users\arno\Documents\r\LSC\PLwork2.r:34:10: unexpected '='
33: zz<-merge(transform(merge(value,allcon,all.y=T),SHORTDESCRIPTION=NULL,
34: + VALUE ^
What is wrong?
TY for any help
Remove the plus sign. On Thu, May 13, 2010 at 9:54 AM, arnaud Gaboury <arnaud.gaboury@gmail.com>wrote:> Dear group, > > I have this command line in a function: > > > zz<-merge(transform(merge(value,allcon,all.y=T),SHORTDESCRIPTION=NULL,VALUE> NULL,PL=-VALUE*pl,quantity=NULL),PosB,all.x=T,sort=F) > > I want to cut it in 2 lines (just for convenient purpose). Here is what I > did : > > > zz<-merge(transform(merge(value,allcon,all.y=T),SHORTDESCRIPTION=NULL, > + VALUE=NULL,PL=-VALUE*pl,quantity=NULL),PosB,all.x=T,sort=F) > > But when I source the function, I get an error message: > > Error in source("C:\\Users\\arno\\Documents\\r\\LSC\\PLwork2.r") : > C:\Users\arno\Documents\r\LSC\PLwork2.r:34:10: unexpected '=' > 33: > zz<-merge(transform(merge(value,allcon,all.y=T),SHORTDESCRIPTION=NULL, > 34: + VALUE> ^ > > What is wrong? > > TY for any help > > ______________________________________________ > 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. >-- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
Dear Arnaud,
Wrap a pair of curly brackets around the command line and remove the
"+" like the following;
zz<-{merge(transform(merge(value,allcon,all.y=T),SHORTDESCRIPTION=NULL,
VALUE=NULL,PL=-VALUE*pl,quantity=NULL),PosB,all.x=T,sort=F )}
Muhammad
arnaud Gaboury wrote:> Dear group,
>
> I have this command line in a function:
>
>
zz<-merge(transform(merge(value,allcon,all.y=T),SHORTDESCRIPTION=NULL,VALUE>
NULL,PL=-VALUE*pl,quantity=NULL),PosB,all.x=T,sort=F)
>
> I want to cut it in 2 lines (just for convenient purpose). Here is what I
> did :
>
>
> zz<-merge(transform(merge(value,allcon,all.y=T),SHORTDESCRIPTION=NULL,
> + VALUE=NULL,PL=-VALUE*pl,quantity=NULL),PosB,all.x=T,sort=F)
>
> But when I source the function, I get an error message:
>
> Error in source("C:\\Users\\arno\\Documents\\r\\LSC\\PLwork2.r")
:
> C:\Users\arno\Documents\r\LSC\PLwork2.r:34:10: unexpected '='
> 33:
zz<-merge(transform(merge(value,allcon,all.y=T),SHORTDESCRIPTION=NULL,
> 34: + VALUE> ^
>
> What is wrong?
>
> TY for any help
>
> ______________________________________________
> R-help at 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.
>