Hi R list,
I like the default ticks that are set up using grid.xaxis() or grid.yaxis()
with no arguments. Finding good values for the 'at' argument is usually not
a trivial task; the default behavior of these functions seems to work well.
The problem with this strategy is that I cannot figure ou
Hi Joseph,
I know that the RMySQL and RODBC packages allow you to pull the result of a
MySQL query into a data.frame within R.
I like RODBC because you can access many different flavors of RDBMS's.
-David Johnston
--
View this message in context:
http://r.789695.n4.nabble.com/Pulling-data-f
Here's one way:
# Here I read in your data to a variable 'x'
x = read.delim(textConnection(
"Bin Depth Fish
1 4 2
1 8 24
1 12 4
2 4 3
2 8 21
2 12 2
3 4 12
3 8 2
3 12 33"), sep = " ", header = TRUE)
do.call(rbind, lapply(split(x, x$Bin), function(grp)
grp[which.max(grp$Fish),]))
--
View this mes
I recommend the 'rgl' package. It can draw 3d scatterplots, shapes, and
surfaces. You can spin, and zoom in with the mouse. You can record a
"movie" of the rotating graphic.
http://cran.r-project.org/web/packages/rgl/index.html
-David Johnston
--
View this message in context:
http://r.7896
The function all.equal also might be helpful.
See the help page.
>help(all.equal)
-David Johnston
--
View this message in context:
http://r.789695.n4.nabble.com/identical-values-not-so-identical-newbie-help-please-tp3346078p3346581.html
Sent from the R help mailing list archive at Nabble.com.
sapply(z, function(row) ...) does not actually grab a row at a time out of
'z'. It grabs a column (because 'z' is a data.frame)
You may want:
t(apply(z, 1, function(row) row - means))
or:
t(t(z) - means)
Hope that helps,
-David Johnston
--
View this message in context:
http://r.789695.n4.n
There might be something simpler, but this is what I came up with:
form = "C5H11BrO"
ups = c(gregexpr("[[:upper:]]", form)[[1]], nchar(form) + 1)
seperated = sapply(1:(length(ups)-1), function(x) substr(form, ups[x],
ups[x+1] - 1))
elements = gsub("[[:digit:]]", "", seperated)
nums = gsub("[[:al
Thank you Joshua and Duncan for your very quick responses.
Joshua, I will indeed read more about the OpenGL and GLU systems.
Duncan, I am running R via a console. I also tried via the GUI R.app and
the same problems with loading the package and opening a graphics device
occurred.
I find it
Hello,
I have been experiencing an odd error with the RGL package that I cannot
figure out. I have searched without luck for fixes to this problem on
Rseek, Google, and the R-help-list.
RGL used to work on my machine about a month ago. It was a very useful
tool. The graphics device will not i
9 matches
Mail list logo