Creating variable to use in file.path command

I am trying to use R to analyze a batch of data from LCMS. I am using an R package that has already been developed. I am new to using R. In the code I input a file path as a variable inside the function as shown below.

'function( 
			filepath.mzXML<- "/Users/phoebe/Desktop/R-code test", )'

Later in the code, it uses this variable to do the file.path function. I get the following Error code when I run the code.

function( 
+ 			filepath.mzXML<- "/Users/phoebekeyes/Desktop/R-code test",
Error: unexpected assignment in:
"function( 
                        filepath.mzXML<-"

Can someone help me determine how to resolve this issue? Thank you in advance!

This doesn't need to be in a function. Use

filepath.mzXML <- "/Users/phoebekeyes/Desktop/R-code test"

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.