Re: [R] Solving Classification problems in R

2014-02-28 Thread JiHO
Do you mean supervised or unsupervised classification. If supervised, I have had great success using gradient boosted classification in package gbm. multinomial distribution will get you multiple classes and it will select relevant predictors by itself given the training data. Not sure about the

Re: [R] Data Rearrangement

2014-02-28 Thread JiHO
You actually want cast() from the reshape package, not melt(). I would recommend using dcast() from reshape2, the newer version of reshape. Jean-Olivier Irisson — Université Pierre et Marie Curie Laboratoire d'Océanographie de Villefranche 181 Chemin du Lazaret 06230 Villefranche-sur-Mer Tel: +33

Re: [R] Heatmap in R and/or ggplot2

2011-06-15 Thread JiHO
Windows. Since mencoder works on the command line, you can call it from R and I have code to ease that: https://gitorious.org/r/r-utils/blobs/master/lib_movie.R but you should get familiar with mencoder a little bit before trying to read/understand it. JiHO --- http://maururu.net

[R] Class htest with non-numeric p-values

2011-04-20 Thread JiHO
to include that in an object of class htest? I see in print.htest() that the p.value element goes through format.pval() which expect a numeric argument. Is there any workaround? Thank you in advance. Sincerely, JiHO --- http://maururu.net __ R-help@r

[R] Marginality rule between powers and interaction terms in lm()

2011-01-21 Thread JiHO
they should not be removed in most circumstances. I haven't found anything related to quadratic vs. interactions. Thanks in advance for your help. Sincerely, JiHO --- http://maururu.net __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] Plotting a cloud/fog of variable density in rgl

2010-11-28 Thread JiHO
is really to add this to my R-plotting arsenal and use it in routine, not to develop something very specific for this particular application. But thank you for taking the time to reply, maybe I'll come back to this when I know more. JiHO --- http://maururu.net

[R] Plotting a cloud/fog of variable density in rgl

2010-11-22 Thread JiHO
(rgl) spheres3d(d$x, d$y, d$z, alpha=alpha, radius=0.05) I saw the fog effect but it seems to add a fog in the scene to increase depth. What I want is my scene to actually look like a fog. Thanks in advance for any help. Sincerely, JiHO --- http://maururu.net

[R] Confidence interval around a mean count (poisson based?)

2010-05-05 Thread JiHO
. PS: what I did so far was just compute mean +/- SD. The result is here: http://dl.dropbox.com/u/1047321/hist_mean-SD.pdf Maybe the SD is already so large that it is not even worth trying to pursue my goal above... Sincerely, JiHO --- http://maururu.net

Re: [R] read.table or read.csv without row index?

2010-05-05 Thread JiHO
because it needs a numeric vector and does not automatically convert your data.frame into it. So you need: mean.default(as.numeric(temp[2,2:3])) or more simply mean(as.numeric(temp[2,2:3])) I hope that helped. Sincerely, JiHO --- http://maururu.net

[R] quartz() and dpi

2010-01-27 Thread JiHO
. I would rather leave the latex document alone, use extension-less file names includegraphics and decide from R wether to produce a pdf or a png. Thank you in advance, JiHO --- http://maururu.net __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] Merge data frames but prefer values in on

2009-09-14 Thread JiHO
? Thanks but by in one step I meant within the merge, not in one post- processing step ;) JiHO --- http://maururu.net __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] Merge data frames but prefer values in one

2009-09-10 Thread JiHO
to some post-processing after merge? It seems that it might be something like a right merge for data bases but I don't know this world at all. I would be happy to look into sqldf if that allows to do things like that. Thanks in advance. Sincerely, JiHO --- http://maururu.net

Re: [R] Cream Text Editor

2009-05-23 Thread JiHO
to edit the file .vim/ftplugin/r.vim. There is a line commented with the gnome- terminal command instead of xterm. Uncomment this one and comment the xterm one. JiHO --- http://jo.irisson.free.fr/ __ R-help@r-project.org mailing list https

Re: [R] Cream Text Editor

2009-05-23 Thread JiHO
of executing them. Maybe that's specific to Cream. JiHO --- http://jo.irisson.free.fr/ __ 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

Re: [R] [R-sig-Geo] Comparing spatial distributions - permutation test implementation

2009-05-21 Thread JiHO
and actually closer to yours. Looking at your code I still don't get what I am doing wrong though. It seems we both use sample to get a few of the columns and then swap them. Well, I'll use your test anyway. JiHO --- http://jo.irisson.free.fr/ __ R

[R] Comparing spatial distributions - permutation test implementation

2009-05-20 Thread JiHO
= 0.224 # p-value = 0.1900 Thank you very much in advance. Sincerely, JiHO --- http://jo.irisson.free.fr/ [1] A statistical test for a difference between the spatial distributions of two populations. Syrjala SE. Ecology. 1996;77(1):75–80. http://dl.getdropbox.com/u/1047321/Syrjala1996.pdf [2

Re: [R] Evaluating content of command line arguments

2009-05-01 Thread JiHO
On 2009-April-30 , at 22:28 , Gabor Grothendieck wrote: Check out the getopt package. Thanks! That's what I need. JiHO --- http://jo.irisson.free.fr/ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] Evaluating content of command line arguments

2009-04-30 Thread JiHO
? Otherwise I will resort to parsing the arguments with strsplit but I would much prefer and more elegant solution. Thank you very much in advance. Sincerely, JiHO --- http://jo.irisson.free.fr/ __ R-help@r-project.org mailing list https

Re: [R] 'require' equivalent for local functions

2009-03-23 Thread JiHO
keyboard shortcut in my text editor to source the current file in the currently R session, so it will be easy to re-source some files after I modify them. On the other hand I have a bundle of general enough functions that I import in many projects (http://github.com/jiho/r-utils/ for those

Re: [R] Converting Matrix into List - problem (urgent)

2009-03-22 Thread JiHO
context to help you. JiHO --- http://jo.irisson.free.fr/ __ 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

Re: [R] Converting Matrix into List - problem (urgent)

2009-03-22 Thread JiHO
would use scan with the filename in which the data is, rather than the textConnection. That's just for the purpose of the demonstration here. # possible outputs congeneric[1:20] as.list(congeneric[1:20]) for (i in 1:20) { cat(congeneric[i],\n) } JiHO --- http://jo.irisson.free.fr

Re: [R] Converting Matrix into List - problem (urgent)

2009-03-22 Thread JiHO
want to print a clean output on the screen? If yes, look at `cat`, or `print`. JiHO --- http://jo.irisson.free.fr/ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] 'require' equivalent for local functions

2009-03-22 Thread JiHO
there should be a better way. JiHO --- http://jo.irisson.free.fr/ __ 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

Re: [R] plotting two variables with a third used for color

2009-03-21 Thread JiHO
(wY[0:15,3]0,0,0)) ggplot(data=dat) + geom_point(aes(x=v,y=y,colour=sign)) JiHO --- http://jo.irisson.free.fr/ __ 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

Re: [R] Plot and Boxplot in the same graph

2009-03-21 Thread JiHO
you just asked: http://had.co.nz/ggplot2/geom_jitter.html look at the end. As for transparency, you can use geom_boxplot(fill=alpha(white,0.5)) for example. JiHO --- http://jo.irisson.free.fr/ __ R-help@r-project.org mailing list https

Re: [R] R on Mac PRO does anyone have experience with R on such a platform ?

2008-02-12 Thread jiho
On 2008-February-11 , at 21:06 , Charilaos Skiadas wrote: JiHO, in case you are not following TextMate's mailing list, you might want to check out Hans-Jorg Bibiko's work on Rdaemon: http://article.gmane.org/gmane.editors.textmate.general/24195/ It provides a lot of the terminal

Re: [R] fun.aggregate=mean in reshape

2008-02-12 Thread jiho
environment except for R 2.6.1 instead of 2.6.2. Have you tried specifying the argument name explicitely? JiHO --- http://jo.irisson.free.fr/ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] R on Mac PRO does anyone have experience with R on such a platform ?

2008-02-11 Thread jiho
it but learning Emacs is a task in itself. [1] http://macromates.com/ [2] modification of those http://jo.irisson.free.fr/?p=32 for the built-in Terminal, since Terminal on Leopard finally has tabs JiHO --- http://jo.irisson.free.fr/ __ R-help@r-project.org

Re: [R] [R-sig-Geo] Comparing spatial point patterns - Syrjala test

2008-02-10 Thread jiho
? Thanks much! Begin forwarded message: From: jiho [EMAIL PROTECTED] Subject: Comparing spatial point patterns - Syrjala test Dear Lists, At several stations distributed regularly in space[1], we sampled repeatedly (4 times) the abundance of organisms and measured environmental parameters

[R] Comparing spatial point patterns - Syrjala test

2008-02-09 Thread jiho
Dear Lists, At several stations distributed regularly in space[1], we sampled repeatedly (4 times) the abundance of organisms and measured environmental parameters. I now want to compare the spatial distribution of various species (and test wether they differ or not), or to compare the

Re: [R] [R-sig-Geo] Comparing spatial point patterns - Syrjala test

2008-02-09 Thread jiho
On Feb 9, 2008 10:39 PM, milton ruser [EMAIL PROTECTED] wrote: I have no idea of how to solve this issue, but I suggest you write to the authors of spatstat package. I think they could help you very much. Another thing is that there was a threhead on this many times ago. May be that Alan

Re: [R] Incomplete ouput with sink and split=TRUE

2008-02-06 Thread jiho
On 2008-February-06 , at 14:45 , Duncan Murdoch wrote: On 2/5/2008 11:12 AM, jiho wrote: Dear List, I am trying to get R's terminal output to a file and to the terminal at the same time, so that I can walk through some tests and keep a log concurrently. The function 'sink

[R] how to suppress some tk dialogs

2008-02-05 Thread jiho
). This may give you the reason behind this seemingly strange question. JiHO --- http://jo.irisson.free.fr/ __ 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

Re: [R] how to suppress some tk dialogs

2008-02-05 Thread jiho
think the answer is in the help for options(), and more obvious from ?chooseCRANmirror (which seems to be one of the functions you are using). Indeed, the option to set is menu.graphics=FALSE Thank you very much! On Tue, 5 Feb 2008, jiho wrote: Dear List, I noticed that, when executing

[R] Incomplete ouput with sink and split=TRUE

2008-02-05 Thread jiho
)? Is there an inherent reason why some portions of this output are not redirected? Thank you in advance for your help. JiHO --- http://jo.irisson.free.fr/ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] row-wise conditional update in dataframe

2008-01-22 Thread jiho
directly. Is there such a modified apply in some package? [1] ?apply says If X is not an array but has a dimension attribute, apply attempts to coerce it to an array via as.matrix if it is two-dimensional (e.g., data frames) or via as.array. JiHO --- http://jo.irisson.free.fr

[R] sorting in 'merge'

2008-01-21 Thread jiho
behaviour of merge? Thanks in advance. PS: code a = data.frame(field1=c(1,1,2,2),field2=c(1:2,1:2),var1=runif(4)) b = data.frame(field1=c(2,2,1,1),field2=c(1,2,2,1),var2=runif(4)) a b merge(b,a) merge(b,a,sort=F) b = rbind(b,b[1,]) b merge(b,a,sort=F) JiHO --- http://jo.irisson.free.fr

[R] Selecting rows conditionally between 2 data.frames

2008-01-18 Thread jiho
in advance. JiHO --- http://jo.irisson.free.fr/ __ 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

Re: [R] things that are difficult/impossible to do in SAS or SPSS butsimple in R

2008-01-15 Thread jiho
purpose is documentation) but overlaying two graphs is often as simple as adding them: p - ggplot(mtcars, aes(x=wt, y=mpg)) + geom_point() g - geom_path(aes(x=wt,y=mpg, colour=qsec)) p + g (this example is probably useless but it is only for demonstration purposes) JiHO --- http://jo.irisson.free.fr

Re: [R] 4 dimensional graphics

2008-01-10 Thread jiho
4 9 718 7 4 17 813 7 1 1 73.4 7 1 9 46.5 7 1 17 205 JiHO --- http://jo.irisson.free.fr/ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

[R] ggplot2, coord_equal and aspect ratio

2008-01-10 Thread jiho
=c(0,1)) which has no effect. but the side effect of enforcing the square domain is that: ggplot(data=a, aes(x=x,y=y)) + geom_point() + coord_equal() + scale_y_continuous(limits=c(0,0.3)) has no effect either (i would expect to see only the points 0.3) JiHO --- http://jo.irisson.free.fr

Re: [R] Rscript on OSX

2008-01-09 Thread jiho
startup script (.profile, .bashrc whatever) so that the display variable is defined. You'll have to start X11 manually but once it is started, you should be able to run X11 apps directly from Terminal.app Hope that helps. JiHO --- http://jo.irisson.free.fr

[R] use ggplot in a function to which a column name is given

2007-12-13 Thread jiho
foo3 work would be appreciated. Thanks in advance for your expertise. JiHO --- http://jo.irisson.free.fr/ __ 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

Re: [R] use ggplot in a function to which a column name is given

2007-12-13 Thread jiho
Follow up. On 2007-December-13 , at 10:45 , jiho wrote: foo1 - function(uv=u) { # solution 1: do not use the data argument at all # (forces the use of qplot, could be more elegant) B = A[A$y=5,] qplot(B$x, B$y, fill=B[[uv]], geom=tile) } --- actually

Re: [R] use ggplot in a function to which a column name is given

2007-12-13 Thread jiho
On 2007-December-13 , at 15:56 , hadley wickham wrote: Hi Jiho, The key to solving this problem is to use aes_string instead of aes. Instead of the complicated munging that aes does to get the names of the variables, aes_string works directly with strings, so that: aes_string(x = mpg, y

Re: [R] Problem with graphics device in Mac OS X

2007-12-10 Thread jiho
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. JiHO --- http://jo.irisson.free.fr/ __ R-help@r-project.org

Re: [R] 2/3d interpolation from a regular grid to another regular grid

2007-12-05 Thread jiho
a little further, but the principle holds. Thanks very much. I'll test this soon (and it looks like the vector operation might even be directly translatable in Fortran which is nice since I'll need to do it in Fortran too). Thanks again. JiHO --- http://jo.irisson.free.fr

Re: [R] 2/3d interpolation from a regular grid to another regular grid

2007-12-05 Thread jiho
answer and if someone knows a function doing what is described above, that would be terrific. JiHO --- http://jo.irisson.free.fr/ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] 2/3d interpolation from a regular grid to another regular grid

2007-12-04 Thread jiho
to this is generic enough to work in nD) Thank you in advance. JiHO --- http://jo.irisson.free.fr/ __ 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

Re: [R] pdf() device uses fonts to represent points - data alteration?

2007-11-01 Thread jiho
and I like to be able to view them quickly. I would need a quick SVG viewer but there are none on OS X. If you are on Linux, many documents viewers (eog, evince, gThumbs) can display SVGs so you would be all set. JiHO --- http://jo.irisson.free.fr

Re: [R] pdf() device uses fonts to represent points - data alteration?

2007-10-31 Thread jiho
Thank you very much for your answer, even so long after I first posted the message. On 2007-October-31 , at 12:00 , Paul Murrell wrote: Hi jiho wrote: Hello all, I discovered that the pdf device uses fonts to represent points symbols (as in plot(...,type=p,...) ). Namely it uses

Re: [R] Linux editor for R+LaTeX, but not Emacs

2007-10-05 Thread jiho
for a penguin. [1] http://jo.irisson.free.fr/?p=32 JiHO --- http://jo.irisson.free.fr/ __ 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

Re: [R] Plotting from different data sources on the same plot (with ggplot2)

2007-09-30 Thread jiho
, although it gets a bit more complicated when you consider other scales like colour and size. I understand. Anyway, ggplot2 is still in its early stages and this may come after some maturing. Thanks for your answers. JiHO --- http://jo.irisson.free.fr

Re: [R] plot graph with error bars trouble

2007-09-30 Thread jiho
be done without deep knowledge of the architecture of ggplot2. I probably won' t be able to make significant contributions before a while but I would be happy to see how ggplot2 progresses and which directions are taken by following an SVN tree. JiHO --- http://jo.irisson.free.fr

Re: [R] Plotting from different data sources on the same plot (with ggplot2)

2007-09-30 Thread jiho
This was meant to be sent on the list: On 2007-September-30 , at 23:12 , jiho wrote: On 2007-September-30 , at 21:01 , hadley wickham wrote: [...] As expected there is nothing in the data part of the p object p$data NULL But there is no data specification either in the layers p$layers

Re: [R] Plotting from different data sources on the same plot (with ggplot2)

2007-09-30 Thread jiho
what platform you're on, I can send you an updated version. JiHO --- http://jo.irisson.free.fr/ __ 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

Re: [R] Graphics and LaTeX documents with the same font

2007-09-28 Thread jiho
On 2007-September-28 , at 16:57 , Frank E Harrell Jr wrote: jiho wrote: On 2007-September-28 , at 15:18 , Paul Smith wrote: On 9/28/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: I know how to export graphics as pdf files and then how to include them in LaTeX documents. However, I do

Re: [R] Graphics and LaTeX documents with the same font

2007-09-28 Thread jiho
it to pstricks I personally use Inkscape on all my R graphics because I find it easier and quicker to get decent graphics and R and refine their look in Inkscape than to get them perfect in R in one shot ( though with ggplot2 things are improving on R's side). Cheers, JiHO --- http

[R] Plotting from different data sources on the same plot (with ggplot2)

2007-09-27 Thread jiho
in several steps, otherwise it will soon become too complicated to manage. Thank you very much in advance for your help. JiHO --- http://jo.irisson.free.fr/ __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read