[R] Why is options(digits = 1) displays two digits?

2017-03-21 Thread Tal Galili
This may have been asked before, but I don't understand the behavior of options(digits = 1) for vectors containing values such as 0.01 For example, why is this happening: options(digits = 1) > 0.01 [1] 0.01 More examples: > options(digits = 7) > 0.1 [1] 0.1 > 0.01 [1] 0.01 > 0.11 [1] 0.11 >

[R] Is a list an atomic object? (or is there an issue with the help page of ?tapply ?)

2017-02-04 Thread Tal Galili
In the help page of ?tapply it says that the first argument (X) is "an atomic object, typically a vector." However, tapply seems to be able to handle list objects. For example: ### l <- as.list(1:10) is.atomic(l) # FALSE index <- c(rep(1,5),rep(2,5)) tapply(l,index,unlist) >

Re: [R] colored table

2016-05-30 Thread Tal Galili
Hell Naresh, If to add to what others already wrote, there is also the new {heatmaply } package, which enable you to create *interactive* heatmaps. For examples, you can view the vignette here:

[R] Using MASS::boxcox for a single variable gives different results than the original paper

2015-10-12 Thread Tal Galili
Hello all, Given a set of observations, I would like to find lambda for a boxcox transformation so to get a symmetric/normal result as possible. I try to use MASS::boxcox, but get different results than when using the formula from the original box-cox paper (link

Re: [R] Using MASS::boxcox for a single variable gives different results than the original paper

2015-10-12 Thread Tal Galili
e: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Mon, Oct 12, 2015 at 12:17 PM, Tal Galili <tal.gal...@gmail.com> wrote: > Hello all, >

Re: [R] Using MASS::boxcox for a single variable gives different results than the original paper

2015-10-12 Thread Tal Galili
x, Professor > McMaster University > Hamilton, Ontario > Canada L8S 4M4 > Web: socserv.mcmaster.ca/jfox > > > > > -Original Message- > > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Tal > Galili > > Sent: October 12, 2015 9:32 AM

[R] Making as.hclust.phylo for non binary trees work?

2015-10-01 Thread Tal Galili
Dear R-help mailing list (and Emmanuel, the ape package maintainer), I would like to change a non binary phylo object to hclust, but this does not seem to work smoothly. Here is a small R code to demonstrate the problem: # an hclust tree with 3 branches from the root hc <- hclust(dist(c(1:2,

Re: [R] R and AWS

2015-08-01 Thread Tal Galili
How about this: Setting Rstudio server using Amazon Web Services (AWS) – a step by step (screenshots) tutorial http://www.r-statistics.com/2015/06/setting-rstudio-server-using-amazon-web-services-aws-a-step-by-step-screenshots-tutorial/ Contact

Re: [R] about R 3.2.0

2015-07-25 Thread Tal Galili
Following what Erich wrote, if you are on Windows, there is also a step-by-step screenshot guide for upgrading R using the installr package: http://www.r-statistics.com/2015/06/a-step-by-step-screenshots-tutorial-for-upgrading-r-on-windows/ Contact

[R] Using line (Tukey's robust line) on 3 observations?

2014-12-04 Thread Tal Galili
By accident I came across the following example: x - 1:3 y - 1:3 line(x, y) # returns: Call: line(x, x) Coefficients: [1] -2 2 While when using 1:4, it will give the more reasonable 0,1 coefficients. I imagine this is in the way it calculate the quantiles (i.e.: a feature). Can someone

Re: [R] wilcox.test - difference between p-values of R and online calculators

2014-09-03 Thread Tal Galili
It seems your numbers has ties. What happens if you run wilcox.test with correct=FALSE, will the results be the same as the online calculators? Contact Details:--- Contact me: tal.gal...@gmail.com | Read me: www.talgalili.com

[R] Is there an ID3 implementation in R?

2014-09-02 Thread Tal Galili
Dear R help mailing list, I am looking for an ID3 implementation in R. I know that there are many other decision tree algorithms already implemented (via rpart, tree, caret, C50, etc., etc.), but for research purposes I would like to reproduce the result of running ID3. I was not able to find

Re: [R] Is there an ID3 implementation in R?

2014-09-02 Thread Tal Galili
) -- On Tue, Sep 2, 2014 at 6:13 PM, Wensui Liu liuwen...@gmail.com wrote: Rweka On Sep 2, 2014 11:04 AM, Tal Galili tal.gal...@gmail.com wrote: Dear R help mailing list, I am looking for an ID3 implementation in R. I know that there are many other decision tree algorithms

Re: [R] Is there an ID3 implementation in R?

2014-09-02 Thread Tal Galili
-statistics.com (English) -- On Tue, Sep 2, 2014 at 6:13 PM, Wensui Liu liuwen...@gmail.com wrote: Rweka On Sep 2, 2014 11:04 AM, Tal Galili tal.gal...@gmail.com wrote: Dear R help mailing

Re: [R] Split PVClust plot

2014-08-30 Thread Tal Galili
Hi Tom, There is a as.dendrogram.pvclust function in the package dendextend. (it is on CRAN: http://cran.r-project.org/web/packages/dendextend/) You can run: install.packages('dendextend') library(dendextend) result2 - as.dendrogram(result) # You can then also use the prune function in

Re: [R] about rect.hclust

2014-04-26 Thread Tal Galili
Thank you for mentioning the dendextendhttp://cran.r-project.org/web/packages/dendextend/package Gregory. As I mention in the package, the dendextend package implements a similar function as in the dendroextra. The big difference between the two is that the dendextend package has an

[R] How to implement a recurring check for updates for R and packages?

2014-04-09 Thread Tal Galili
Hello all, I wish to add to the installrhttp://cran.r-project.org/web/packages/installr/package the ability to check for new versions of R once every X units of time (maybe once every two weeks). I would like to keep a time stamp somewhere, that would stay persistent across R sessions (i.e.:

Re: [R] How to implement a recurring check for updates for R and packages?

2014-04-09 Thread Tal Galili
a question for R-devel] On Wed, Apr 9, 2014 at 5:02 AM, Tal Galili tal.gal...@gmail.com wrote: Hello all, I wish to add to the installrhttp://cran.r-project.org/web/packages/installr/package the ability to check for new versions of R once every X units of time (maybe once every two weeks

[R] Package development: overriding a function from one package with a function from another?

2014-02-19 Thread Tal Galili
Dear R users, I am currently working on developing two packages, below is a simplified version of my problem: In package A I have some functions (say sum_twice), and I it calls to another function inside the package (say slow_sum). However, in package B, I wrote another function (say fast_sum),

[R] Basic question: why does a scatter plot of a variable against itself works like this?

2013-11-06 Thread Tal Galili
Hello all, I just noticed the following behavior of plot: x - c(1,2,9) plot(x ~ x) # this is just like doing: plot(x) # when maybe we would like it to give this: plot(x ~ c(x)) # the same as: plot(x ~ I(x)) I was wondering if there is some reason for this behavior. Thanks, Tal

[R] Reproducing density(..., kernel='rectangular', width=1) using convolve? (for educational purposes)

2013-10-21 Thread Tal Galili
Hello dear R-help members, I am currently teaching students on kernel density estimators, and I was hoping to show them an animation of the convolution which is taking place in the density function. I wrote a (somewhat clunky) piece of code to reproduce the density function, but I seem to get

Re: [R] No P.values in polr summary

2013-10-19 Thread Tal Galili
Vincent, I believe Prof. Ripley is referring to this: http://www.stats.ox.ac.uk/pub/MASS4/ Contact Details:--- Contact me: tal.gal...@gmail.com | Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |

Re: [R] raster package: OpenStreetMap broken on Ubuntu, works on Mac

2013-09-23 Thread Tal Galili
Jos had e-mailed me that he found a fix to this problem (after he had originally asked me, and I sent him to R-help/ the package maintainer), so I thought of keeping this thread updated with his reply: After Jos communicated with the maintainers about this, the fix is to install the raster

Re: [R] Windows The system cannot find the path specified error when submitting R in batch mode

2013-08-22 Thread Tal Galili
Hello James, Does this answer your question: http://stackoverflow.com/questions/14956887/problems-executing-script-from-command-line-in-r-error-message-cannot-find-pat ? Contact Details:--- Contact me: tal.gal...@gmail.com |

Re: [R] download.file error - corrupt: Can't read SAT; charset=binary'

2013-08-22 Thread Tal Galili
with the method I indicated before. Best, Uwe Ligges On 22.08.2013 07:23, Tal Galili wrote: Dear Uwe, My apologies - my original code had mode=wb, which also *does not* work and produce the errors I've mentioned in the previous e-mail. The code I pasted had mode =w, since that is one

Re: [R] download.file error - corrupt: Can't read SAT; charset=binary'

2013-08-22 Thread Tal Galili
...@gmail.com | Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Thu, Aug 22, 2013 at 8:52 PM, Tal Galili tal.gal...@gmail.com wrote: Dear Uwe, Here

[R] download.file error - corrupt: Can't read SAT; charset=binary'

2013-08-21 Thread Tal Galili
Dear R-help mailing list memebers, I encountered the following error, and I'd be happy for ideas on how to fix it: # using R 3.0.1 on Windows 7: exe_URL = 'http://pandoc.googlecode.com/files/pandoc-1.11.1.msi' exe_filename - file.path(tempdir(), file.name.from.url(exe_URL))

Re: [R] download.file error - corrupt: Can't read SAT; charset=binary'

2013-08-21 Thread Tal Galili
Dear Uwe, My apologies - my original code had mode=wb, which also *does not* work and produce the errors I've mentioned in the previous e-mail. The code I pasted had mode =w, since that is one of the versions I've played with (which also does not work). With regards, Tal On Wed, Aug 21,

Re: [R] MDA

2013-08-07 Thread Tal Galili
Hi Tjun, It sounds like you need to go on an NA hunt (e.g: find your missing values in the data). Maybe try running this code: ss - which(apply(is.na(forsen[,-f]), 1, sum)0) forsen[ss,-f] And try to see if you can find these rows. You can also use the above data to find which rows to remove

Re: [R] p values for partial correlations

2013-08-07 Thread Tal Galili
A short self contained code would help us help you. You can try using str on the output of the command you are using, and try to understand where the p.value is located. Tal Contact Details:--- Contact me:

[R] Is it possible (/reasonable) to write an as.RefClass function for R list class?

2013-07-26 Thread Tal Galili
Hello all. I am interested in creating a mutable list object in R. Ideally I would do it through something like this: x - list(a = list(1:4), b = miao, c = 4:1) x_RC - as.RefClass(x) attr(x_RC[[2]], I am) - string x_RC[[3]] - x_RC[[3]]+1 x_new - as.list(x_RC) Is that reasonably possible to

[R] Why do tabs disappear when pasted into the R console?

2013-06-03 Thread Tal Galili
Hello Dear R-help Members, I have noticed that when pasting text with tab in it to the R console it eliminates the tab. Whereas, when pasted into the R Editor, the tab is preserved. For example, pasting this: 1997 7680 In the R Console will result in: 19977680 Is there a way to preserve the tab?

Re: [R] Why do tabs disappear when pasted into the R console?

2013-06-03 Thread Tal Galili
wrote: Pasting tabs into the console works for me on linux, which suggests that you need to provide more information about your OS and all the other usual things. Sarah On Mon, Jun 3, 2013 at 9:15 AM, Tal Galili tal.gal...@gmail.com wrote: Hello Dear R-help Members, I have noticed

Re: [R] Why do tabs disappear when pasted into the R console?

2013-06-03 Thread Tal Galili
during a session. Its help says ‘R_COMPLETION’: Optional. If set to ‘FALSE’, command-line completion is not used. (Not used by Mac OS GUI.) and ??completion gets you there. -pf Sarah On Mon, Jun 3, 2013 at 9:15 AM, Tal Galili tal.gal...@gmail.com wrote

[R] Packages on R 3.0.0

2013-04-03 Thread Tal Galili
Hello all, I see that R 3.0.0 is announced (hurray!), and have a question regarding this line in the NEWS file: Packages need to be (re-)installed under this version (3.0.0) of R. Assuming I copy my packages to the new library folder and run update.packages will it be enough? Or is there

[R] 100 most read R posts for 2012 (from the R blogosphere)

2012-12-31 Thread Tal Galili
(8,903)http://r-bloggers.com/running-r-on-an-iphoneipad-with-rstudio/ I am grateful for the energy so many of you are putting into the R project, and the R community - thank you! Happy new year! Yours, Tal Galili Contact Details

[R] What is behind class coercion of a factor into a character

2012-10-22 Thread Tal Galili
Hello all, Please review the following simple code: # make a factor: x - factor(c(one, two)) # what should be the output to the following expression? c(x, 3)# === # I expected it to be as the output of: c(as.character(x), 3) # But in fact, the output is what would

Re: [R] The difference between chisq.test binom.test and pbinom

2012-08-21 Thread Tal Galili
) | www.r-statistics.com (English) -- On Tue, Aug 21, 2012 at 2:08 AM, Peter Ehlers ehl...@ucalgary.ca wrote: On 2012-08-20 12:24, Tal Galili wrote: Hello all, I am trying to understand the different results

[R] The difference between chisq.test binom.test and pbinom

2012-08-20 Thread Tal Galili
Hello all, I am trying to understand the different results I am getting from the following 3 commands: chisq.test(c(62,50), p = c(0.512,1-0.512), correct = F) # p-value = 0.3788 binom.test(x=62,n=112, p= 0.512) # p-value = 0.3961 2*(1-pbinom(62,112, .512)) # p-value = 0.329 Well, the binom.test

Re: [R] How to convert data to 'normal' if they are in the form of standard scientific notations?

2012-08-07 Thread Tal Galili
Try: options(scipen = 9) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English)

Re: [R] EM for missing data

2012-07-21 Thread Tal Galili
Hello Ya. I am no expert, so I am eager to read suggestions from other people in the mailing list. But just a few pointers I am (somewhat) sure of - You can try using this package: http://cran.r-project.org/web/packages/imputation/imputation.pdf And use something like kNNImpute. KNN solving is

Re: [R] median comparison tests

2012-07-20 Thread Tal Galili
You can do a transformation on your Y, and than use the normal tools. Using something like a median test is not advisable due to low power, and a wilcox.test is considered a better choice (although the meaning is more complex when observations are not symmetrically distributed). If you wish to

Re: [R] loop through and modify multiple data frames

2012-06-28 Thread Tal Galili
Hi Jan, You can do it in two ways. The simplest one is the following. The first option is to use $. Here is how: dogs - data.frame(a = 1:10, b = 10:1) dogs$c - dogs$a+dogs$b dogs The second way it to use ?within Contact

Re: [R] median teat

2012-05-12 Thread Tal Galili
Hi Soheila, There you go: median.test-function(y1,y2){ z-c(y1,y2) g - rep(1:2, c(length(y1),length(y2))) m-median(z) fisher.test(z=m,g)$p.value } group1 - c(2, 2, 5, 5, 4, 3, 1, 5,5,5,5,5) group2 - c(3, 1, 3, 1, 4, 1, 1, 1, 7, 1, 1, 1, 1, 1, 2) boxplot(group1, group2) median.test(group2

Re: [R] file path

2012-05-09 Thread Tal Galili
Hi Wincent, Have a look at: ?file.path Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English)

Re: [R] Dotchart showing mean and median by group

2012-05-09 Thread Tal Galili
Hi Max, I see that dotchart does not have a add parameter. For the fun of it, I added this feature, you can see the source code of the new function here: https://raw.github.com/talgalili/R-code-snippets/master/dotchart.with.add.r With your example at the end of the file. Here is a page showing

Re: [R] Dotchart showing mean and median by group

2012-05-09 Thread Tal Galili
Hello dear Gabor, First - thank you for this solution! Second - I see that the text that is added around the axes is a tiny bit shifted - causing a slight blur of the text. Does it happen only on Windows? Can it be fixed? Contact

Re: [R] Binomial GLM, chisq.test, or?

2012-05-07 Thread Tal Galili
Hi Lincoln, Some thoughts: 1) Did you intend to use cohort as a factor and not as a numeric? (at least that is what it looks like in your output) 2) Is there a strong correlation between cohort and the other explanatory variables you are trying in your model? Contact

Re: [R] Correct use of ddply with own function

2012-05-05 Thread Tal Galili
Hi Johannes , Try this: var1 - rep(c(a,b),c(100,100)) var2 - runif(200,1,50) df.test - data.frame(var1,var2) fn - function(x){ x - x$var2 x1 - sort(x) x2 - seq(length(x)) x3 - x2/max(x2) df - data.frame(x1,x2,x3) df } require(plyr)

Re: [R] Binomial GLM, chisq.test, or?

2012-05-04 Thread Tal Galili
Without going deeply into your analysis, 2 comments: 1) Use the anova command to test two nested models using: anova(model1, model2, test=Chisq) 2) glm's are non-trivial models (at least to me), be sure to google for some tutorials in order to understand what you are looking at... Cheers, Tal

Re: [R] read multiple dataset at one time

2012-05-01 Thread Tal Galili
Without more information on the format of the files, or any other thing, it is hard to give a full answer. But shortly: yes, it is possible. With a bit more details: You can combine: readLines (or read.table, or what ever will work for your file), with list.files And run through them with a for

Re: [R] r2 and p value dispaly in table

2012-04-29 Thread Tal Galili
You came close. Here is how it might be done: individual - rep(c(1,1,6,8,8,9,9,9,12,12),2) day - rep(c(4,17,12,12,17,3,9,22,13,20),2) condition - rep(c(0.72, 0.72, 0.67, 0.73, 0.76, 0.65, 0.68, 0.78, 0.73, 0.71),2) test - data.frame(individual, day, condition) #ind.id - unique(test$individual)

Re: [R] r2 and p value dispaly in table

2012-04-29 Thread Tal Galili
I am not sure why you would want it, but here it is: individual - c(1,1,6,8,8,9,9,9,12,12) day - c(4,17,12,12,17,3,9,22,13,20) condition - c(0.72, 0.72, 0.67, 0.73, 0.76, 0.65, 0.68, 0.78, 0.73, 0.71) test1 - data.frame(individual, day, condition) test1 library(plyr) result=ddply(test1,

Re: [R] searchina a pattern in a string

2012-04-24 Thread Tal Galili
If it was only numbers with no dashes or up to 2 dashes, you can do it like this: require(stringr) STRING - my no is 9876543210 is personal no and my official no is 123-456-8907. you can use any of these str_extract_all( STRING , [0-9]+-*[0-9]+-*[0-9]+) (and then clean the numbers...)

Re: [R] Script Help Or Excel Add-in

2012-04-21 Thread Tal Galili
Hi Ben, 1) Have a look at: http://rcom.univie.ac.at/download.html 2) I do not know. Good luck, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) |

Re: [R] Problem with Tukey test

2012-04-20 Thread Tal Galili
Hi, I can not reproduce your problem. Can you use ?dput, and try to create a self contained example? Here is my attempt: warpbreaks1 - warpbreaks warpbreaks1[1,1] - NA fm1 - aov(breaks ~ tension, data = warpbreaks1) summary(fm1) TukeyHSD(fm1) Contact

Re: [R] working with environments to ensure code quality for long R scripts

2012-04-19 Thread Tal Galili
Hi Alexander, Saving full environments is possible, but it is very easy to start loosing track on where each variable came from. You might want to use this process: http://www.r-bloggers.com/a-better-way-of-saving-and-loading-objects-in-r/ It depends on how many variables you work with, but it

Re: [R] enableJIT(2) causes major slow-up in rpart

2012-04-14 Thread Tal Galili
) will show three functions being compiled each time through. Not sure why -- I'll try to find out and see if it can be avoided. luke On Thu, 12 Apr 2012, Tal Galili wrote: Hello, Due to exploration of the JIT capabilities offered through the {compiler} package, I came by the fact

Re: [R] enableJIT(2) causes major slow-up in rpart

2012-04-14 Thread Tal Galili
, 2012 at 12:47 PM, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: On 12.04.2012 23:15, Tal Galili wrote: Hello, Due to exploration of the JIT capabilities offered through the {compiler} package, I came by the fact that using enableJIT(2) can *slow* the rpart function (from the {rpart

Re: [R] Recode Variable

2012-04-12 Thread Tal Galili
Hi David, You bring up a good question. I am not sure what is the right way to solve it. But here is a simple solution I put together: x = c(1:10,5) y = x x[c(2,3)] - NA # reproducing the problem: y[x==5] na2F - function(x) { x2 - x x2[is.na(x)] - F x2 } na2F(x==5) # solved

[R] enableJIT(2) causes major slow-up in rpart

2012-04-12 Thread Tal Galili
Hello, Due to exploration of the JIT capabilities offered through the {compiler} package, I came by the fact that using enableJIT(2) can *slow* the rpart function (from the {rpart} package) by a magnitude of about 10 times. Here is an example code to run: library(rpart) require(compiler)

Re: [R] How to get the SS and MS from oneway.test?

2012-04-09 Thread Tal Galili
From what I can see the function does not give back this information (either in the print output or the output object structure itself). The thing is that I have never studied the statistic used for this test, so I am not sure how it works and if giving the SS MS is meaningful or not. But if you

Re: [R] Siegel-Tukey test for equal variability (code)

2012-03-11 Thread Tal Galili
10, 2012 at 12:05 AM, Tal Galili tal.gal...@gmail.com wrote: With coordination with the code's author (Daniel), The updated code has been uploaded to github here: https://github.com/talgalili/R-code-snippets/blob/master/siegel.tukey.r And also the following post was updated with the code

Re: [R] Create a list object in a loop

2012-03-09 Thread Tal Galili
Hi Aurelie, Please give this a look: http://www.nealgroothuis.name/introduction-to-data-types-and-objects-in-r/ And see if this resolves most, or all, of your questions... Contact Details:--- Contact me: tal.gal...@gmail.com |

Re: [R] Siegel-Tukey test for equal variability (code)

2012-03-09 Thread Tal Galili
With coordination with the code's author (Daniel), The updated code has been uploaded to github here: https://github.com/talgalili/R-code-snippets/blob/master/siegel.tukey.r And also the following post was updated with the code:

Re: [R] how to see inbuilt function(cor.test) how to get p-value from t-value(test of significance) ?

2012-03-07 Thread Tal Galili
Try: getAnywhere(cor.test.default) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English)

Re: [R] Non-parametric test for repeated measures and post-hoc single comparisons in R?

2012-02-19 Thread Tal Galili
The following post would not answer your question at full, but might give some good code/information: http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedmans-test-r-code/ Contact Details:--- Contact me:

Re: [R] Counting occurences of variables in a dataframe

2012-02-11 Thread Tal Galili
Hello Kai This looks like a fun question. Here is my solution, I'd be curious to see solutions by other people here. It can also be tweaked in various ways, and easily put into a function (actually, if you do it - please put it back online :) ) The only thing that might require some work is the

Re: [R] Rearanging Data

2012-02-08 Thread Tal Galili
Hi Kevin, Try using ?dput for putting your code on the list, so people could easily import and play with it. I think you probably need to do this: sub - subset(Claims, Year=Y1) This also should work: sub - Claims [ Year=Y1,] Contact

Re: [R] Rearanging Data

2012-02-08 Thread Tal Galili
) -- On Thu, Feb 9, 2012 at 9:53 AM, Tal Galili tal.gal...@gmail.com wrote: sub - Claims [ Year=Y1,] [[alternative HTML version deleted]] __ R-help@r

Re: [R] box.cox

2012-02-07 Thread Tal Galili
Hamilton, Ontario, Canada http://socserv.mcmaster.ca/jfox -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Tal Galili Sent: February-07-12 2:50 AM To: Rosario Garcia Gil Cc: r-help@R-project.org Subject: Re: [R] box.cox

[R] Suggestion for drop the loser design and analysis in R?

2012-02-06 Thread Tal Galili
Hello all, I would like to plan and analyse a study with k treatments (one of which is a control), with some binary outcome, in order to find the best treatment (e.g: the one with a high number of successes). If this was done with a fixed sample size, the analysis is well known. However, I would

Re: [R] box.cox

2012-02-06 Thread Tal Galili
Use: library(MASS) ?boxcox Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English)

Re: [R] Problem with xtable- rescaling a table

2012-02-05 Thread Tal Galili
Dear Ista, Do you happen to know of a way to use the {tabularx} LaTeX pacakge, so to have it work with xtables? I would rather have my columns adjust themselves then to rotate my table. Thank you in advance, Tal Contact

Re: [R] how to avoid writing index in write.table command

2012-02-05 Thread Tal Galili
write.table(..., row.names = FALSE) (not row.name ) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English)

[R] Using {tabularx} latex package with the {xtable} package?

2012-02-03 Thread Tal Galili
I am trying to solve the problem of having a latex table (produced using the xtable http://cran.r-project.org/web/packages/xtable/index.html, then inserted to a latex file using Sweave), exceeding the margins of my LaTeX document. I found that one such solution can be based on the

Re: [R] Generate data - function

2012-01-31 Thread Tal Galili
Hi Val Look at the help file for ?curve To get the plot. You also need to decide what relevant function will fit the graphs you need. Without knowing what your purpose is, I can not help you on that. Contact Details:---

Re: [R] question of merging two dataframes

2012-01-31 Thread Tal Galili
Hi there, The command for merging is: merge Can you please clarify by which variable you wish to merge by? Can you maybe use ?dput function in order to give a self contained R code example of your data - and the output you wish to get? Best, Tal Contact

Re: [R] nice report generator?

2012-01-30 Thread Tal Galili
) -- On Thu, Dec 8, 2011 at 8:37 PM, Tal Galili tal.gal...@gmail.com wrote: reasonably [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch

[R] Getting htmlParse to work with Hebrew? (on windows)

2012-01-30 Thread Tal Galili
Hello dear R-help mailing list. I wish to be able to have htmlParse work well with Hebrew, but it keeps to scramble the Hebrew text in pages I feed into it. For example: # why can't I parse the Hebrew correctly? library(RCurl) library(XML) u = http://humus101.com/?p=2737; a = getURL(u) a #

Re: [R] help with Box plot

2012-01-27 Thread Tal Galili
Hi Gianni, Have a look at this function: http://hosho.ees.hokudai.ac.jp/~kubo/Rdoc/library/gplots/html/plotCI.html And please also read this: http://en.wikipedia.org/wiki/Box_plot So to know how a boxplot is constructed... Contact

Re: [R] Why was the ‘doSMP’ package removed from CRAN?

2012-01-26 Thread Tal Galili
-dortmund.**de lig...@statistik.tu-dortmund.de wrote: On 25.01.2012 22:20, Tal Galili wrote: Does any one know the reason for this? Is this a technical or a legal (e.g: license) issue? If legal issues were the reason, you had not found it in the archives anymore. Licensing can

[R] Why was the ‘doSMP’ package removed from CRAN?

2012-01-25 Thread Tal Galili
Hello dear list, I just noticed that: Package ‘doSMP’ was removed from the CRAN repository. http://cran.r-project.org/web/packages/doSMP/index.html Does any one know the reason for this? Is this a technical or a legal (e.g: license) issue? Thanks, Tal Contact

Re: [R] debug package: mtrace fails

2012-01-24 Thread Tal Galili
Hi Deivit, Can you offer a self contained example of r code when the function fails for you? Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il

Re: [R] Splitting up large set of survey data into categories

2012-01-24 Thread Tal Galili
Hi andreas, Please give a sample of your data, and how you want it to be after the manipulation. Consider using ?dput Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) |

[R] Sweave question - Setting Soutput code chunks to stay inside page margins?

2012-01-19 Thread Tal Galili
Hello all, Sometimes I get to make an R code chunk (in Sweave) which is longer then the margins of the page. Is there a way to force it to go to the next line (in Sweave) once that happens? Here are two cases this happens in the resulting .tex file (one is a hard case, and the other is simpler)

Re: [R] Sweave question - Setting Soutput code chunks to stay inside page margins?

2012-01-19 Thread Tal Galili
Hi Yihui, The a's case happens when, for example, one prints some long equation function without using spaces in it. It happened to me in something I wrote which I will write now while including spaces if I had known it would solve the issue, but I have yet to have found one (for Sweave, that is

[R] cacheSweave questions (usage and forward compatibility)

2012-01-19 Thread Tal Galili
Hello all, I would like to ask several questions regarding cacheSweave: 1) Is there a way to set cache=true globally? (I tried it using \SweaveOpts but it didn't seem to work) 2) Is there a way to flush specific cache once it is created? (other then erasing the entire cache directory)? Changing

Re: [R] Reshape with multiple aggregation functions

2012-01-18 Thread Tal Galili
This sounds like a job for the melt/cast scheme for the reshape package. There is a tutorial for using it here: http://www.r-statistics.com/2012/01/aggregation-and-restructuring-data-from-r-in-action/ Good luck, Tal Contact

Re: [R] visualization for k-mean clustering

2012-01-18 Thread Tal Galili
Hi Mukul, If you are talking about the steps of the algorithm, then Yihui answered your question.. If you are looking for visualizing the resulting clusters, there is the clustergram function:

Re: [R] R for Windows: Is there a function/package that enables Win32 API Calls?

2012-01-16 Thread Tal Galili
Wouldn't that be possbile to do through the ?system function? Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com

Re: [R] kruskal wallis post hoc?

2012-01-12 Thread Tal Galili
Hi Iasonas , This is a stat question and not an R question. But the general answer is that it could happen :) The R question would have been if their is a Tukey HSD for kruskel.test, the answer is yes: http://stats.stackexchange.com/questions/17342/is-there-a-nonparametric-equivalent-of-tukey-hsd

Re: [R] plot rq lm

2012-01-06 Thread Tal Galili
I asked a while ago what diagnostic plots exists for quantile regression, here: http://stats.stackexchange.com/questions/19291/what-diagnostic-plots-exists-for-quantile-regression And had received no answer. I hope some more information will become available regarding this. Best, Tal

Re: [R] Is it possible to right align text in R graphics?

2012-01-03 Thread Tal Galili
Hello Majid, When you say the text renders correctly on one but not the other, you mean the fonts, or the directionality? Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com

Re: [R] Is it possible to right align text in R graphics?

2012-01-03 Thread Tal Galili
PM, Tal Galili tal.gal...@gmail.com wrote: Hello all, The following line of code includes a right-to-left language text, yet the R graphics engine displays it from left to right. One problem this causes is when there are parenthesis in the test, here is a basic example? plot(1:10, main

Re: [R] Is it possible to right align text in R graphics?

2012-01-03 Thread Tal Galili
And I forgot to include the link to the image, here it is: http://dl.dropbox.com/u/5371432/right-to-left-text%20example%202.png On Wed, Jan 4, 2012 at 12:30 AM, Tal Galili tal.gal...@gmail.com wrote: Thanks to an e-mail from David, I realized that non-Hebrew speakers will not be able

Re: [R] Is it possible to right align text in R graphics?

2012-01-01 Thread Tal Galili
Hi Duncan, Thank you for your reply. I am also using Win 7. And I would be surprised if this would be different in any OS. I guess the answer is that there is no way for making text in a graph in R be right-to-left. Thanks again, and happy new year, Tal Contact

Re: [R] Is it possible to right align text in R graphics?

2011-12-30 Thread Tal Galili
this. Cheers, Bert On Thu, Dec 29, 2011 at 2:18 PM, Tal Galili tal.gal...@gmail.com wrote: Thank you for the reply Jean, but no, it would not fix it :) plot(1:10, main=rev.string(שלום (עולם))) What would fix it is if I had added a number after the parenthesis, but that is a hack

[R] Is it possible to right align text in R graphics?

2011-12-29 Thread Tal Galili
Hello all, The following line of code includes a right-to-left language text, yet the R graphics engine displays it from left to right. One problem this causes is when there are parenthesis in the test, here is a basic example? plot(1:10, main = שלום (טקסט)) Is there a way to make sure

Re: [R] Is it possible to right align text in R graphics?

2011-12-29 Thread Tal Galili
) -- On Fri, Dec 30, 2011 at 12:12 AM, Jean V Adams jvad...@usgs.gov wrote: Tal Galili wrote on 12/29/2011 10:52:55 AM: Hello all, The following line of code includes a right-to-left language text, yet the R graphics engine displays it from left to right. One problem this causes

  1   2   3   4   5   6   7   8   >