set R_LIBS="P:\R prg\R-2.11.1\library"
set R_HOME="P:\R prg\R-2.11.1"
jgr.exe --libpath="P:\R prg\R-2.11.1\library" --rhome="P:\R prg\R-2.11.1"

-- BruceW.Miller,Ph.D. ConservationEcologist NeotropicalBatProject officedetails GallonJug,Belize Mailingaddress P.O.Box37,BelizeCity Belize,CentralAmerica Phone+501-220-9002
When converting from strings, the viewer assumes that the format is year/month/day rather than the day/month/year of your data. So you will have to use the command line to get your variables into the right class.
Ian
-- Bruce W. Miller, Ph.D. Conservation Ecologist Neotropical Bat Project office details Gallon Jug, Belize Mailing address P.O. Box 37, Belize City Belize, Central America Phone +501-220-9002
So I've added better date and time conversion to the data viewer,
supporting a variety of formats. There is really no reason the user
should be limited to the 2010-10-10 format. This will be available in
the 0.4-4 release of deducer.
To do what you want, you do need to write a few lines of R code to
manipulate the Time variable into a numeric format. Perhaps I'll add a
string manipulation dialog at some point, but I don't see that
happening too soon.
ian
Mormoopids <- read.table("/Users/ianfellows/Downloads/Mormoopids.CSV",header=T,sep=",",quote="")
#open data dialog
Mormoopids[,3]<-as.Date(Mormoopids[,3], format= '%m/%d/%Y')
#Deducer 0.4-4 Data viewer type conversion
#hand written code to convert time into numeric
tmp <- strsplit(Mormoopids$Time,":")
Mormoopids$Hour <- sapply(tmp,function(x) as.numeric(x[1]) +
as.numeric(x[2])/60 )
#end hand written code
#plot builder
dev.new()
ggplot() +
geom_density(aes(x = Hour,colour = Species),data=Mormoopids) +
theme_bw()
Try the following and let me know if it works.
1. open R and run the code below.
2. copy the output into a bat file (i.e. jgrLaunch.bat)
3. double click on the pat file
jgrLaunchScript <- function(launcher_loc = NULL) {
win <- Sys.info()[1] == "Windows"
rhome <- R.home()
libs <- paste(.libPaths(), sep = ";", collapse = ifelse(win,
";", ":"))
if (win) {
libs <- gsub("/", "\\\\", libs)
rhome <- gsub("/", "\\\\", rhome)
}
if (is.null(launcher_loc)) {
cat("please select the location of your jgr launcher\n")
launcher_loc <- file.choose()
}
cmd <- paste("set R_HOME=", rhome, "\n", "set R_LIBS=", libs,
"\n", sep = "")
if (win) {
cmd <- paste("set R_HOME=", rhome, "\n", "set R_LIBS=",
libs, "\n", sep = "")
cmd <- paste(cmd, launcher_loc, " --rhome=", rhome, " --libpath=",
libs, sep = "")
}
else {
cmd <- paste("csh\nsetenv R_HOME \"", rhome, "\"\n",
"setenv R_LIBS \"", libs, "\"\n", sep = "")
cmd <- paste(cmd, launcher_loc,"/Contents/MacOS/JGR", sep = "")
}
if(win)
cat("\n\nCopy the following into WordPad and save as \"jgrLaunch.bat\"\n\n")
cat(cmd,"\n")
cat("\n\n\n")
invisible(cmd)
}
jgrLaunchScript()
I'm glad you finally got it working. I don't know how you had JGR
installed, but not rJava. 99% of the time JGR can be run by just
double clicking on the jgr-1_62.exe launcher. 1% of the time, however,
the user's R set-up is imposible to know a priori, and they must
specify the paths themselves. I view this unacceptably complex.
The development version of JGR now has a new feature to mitigate this
problem. If you can run require(JGR) in R, you should be able to
launch JGR. The steps are as follows
1. Open R
2. Install development JGR by running
install.packages('JGR',,'http://www.rforge.net/')
3. run
library(JGR)
JGR()
note: If you are not running Windows R>=2.12.0 you will need to use
install.packages('JGR',,'http://www.rforge.net/', type="source") to
get the development version of JGR.
Given the vast array of possible set-ups, I'd appreciate it if anyone
with a custom set-up (i.e. double clicking on the launcher doesn't cut
it) could try this and let me know if there are any problems.
Best,
Ian