While testing a function for package I got this .out
* installing *source* package 'trib' ...
** R
Error in parse(outFile) :
C:R/trib.Rcheck/00_pkg_src/trib/R/tribF.R:48:27: unexpected input
47:
48: CF[i]<-mean(All[[i]]$μ
^
ERROR: unable to collate and parse R files for package 'trib'
The problem is μ (mu) symbol. All my files have it and I can use those functions. I'd like to use that function in package also, so that my colleagues can use csv files.
Function is below
trib.CoF <- function(x) { #gets file name length input returns coeficient of friction in bar plot generates global var CF
namesAll<-trib.names(x)
CF <<- vector(mode = "numeric") #generate vector for values
for (i in 1:l_All){
CF[i]<-mean(All[[i]]$μ)} #get all coefficient of friction data into CF
names(CF)<-namesAll
barplot(CF,main="Average Friction Coefficient",
xlab="Samples",ylab="μ",xlim=c(0,length(CF)*1.25+1), ylim = c(0,1.2*max(CF)),col=c(1:l_All)) #generate bar plot
legend("topright", legend=signif(CF,6),col=c(1:l_All),pch=16,cex=0.8) #add legends
}
It looks like this question but I can't find a solution.