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: https://cran.r-project.org/web/packages/heatmaply/vi

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 Details:--

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" Contact Details:--

[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] 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 den

[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 suc

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 wrote: > Rweka > On Sep 2, 2014 11:04 AM, "Tal Galili" wrote: > >> Dear R help mailing list, >> >> I am looking for an ID3 implementation in R. I know that there are many >> other decisi

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

2014-09-02 Thread Tal Galili
---Contact > >> Details:----------- > >> Contact me: tal.gal...@gmail.com | > >> Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) > | > >> www.r-statistics.com (English) > >> >

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 (H

[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, 4,5

[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 wrote: > Hello all, > > Given a set of observatio

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

2015-10-12 Thread Tal Galili
iversity > 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 > > To: r-help@r-pro

[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) > tap

[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 > c(0.

[R] Bug in "seq" (or a "feature") ?

2009-08-10 Thread Tal Galili
mation: Tal Galili Phone number: 972-50-3373767 FaceBook: Tal Galili My Blogs: http://www.r-statistics.com/ http://www.talgalili.com http://www.biostatistics.co.il [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://s

[R] A function for plotting a boxplot with added dot and bars (for mean and SE) - please help improve my code

2009-08-12 Thread Tal Galili
mean.and.se.table)) } } # <-- end boxplot3 # Here is a small example: data(mtcars) head(mtcars) attach(mtcars) boxplot.2(mpg , list(round(wt), am) , data = mtcars, las = 2) Hope this will benefit others, and also hope that others will improve on this code and give it back to the comm

Re: [R] the problem about normalize the data frame

2009-08-12 Thread Tal Galili
data,1,bb)) Best, Tal On Wed, Aug 12, 2009 at 1:23 PM, Gina Liao wrote: > > bb<-function(normalize) > (dat[i,]-min(dat[i,]))/(max(dat[i,])-min(dat[i,]))> dat1<-apply(dat,1,bb) > -- ------ My contact information: Tal Galili Phone n

Re: [R] A function for plotting a boxplot with added dot and bars (formean and SE) - please help improve my code

2009-08-12 Thread Tal Galili
given body of > data. > ~ John Tukey > > -Oorspronkelijk bericht- > Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > Namens Tal Galili > Verzonden: woensdag 12 augustus 2009 11:48 > Aan: r-help@r-project.org > Onderwerp: [R] A function for plotting

[R] A request for pointers on how to analyse Twitter with R ?

2009-08-18 Thread Tal Galili
1) a way to pull and store data from twitter 2) a way to extract the data from the database 3) tools to analyse and visualize the data (this, I imagine, can be done using the "tm" package, the rest I don't know how to approach) Can any one give interesting pointers on this one ? Tha

Re: [R] printing a dataframe summary to disk

2009-08-18 Thread Tal Galili
://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. > -- ---------- My contact information: Tal Galili

[R] simple randomization question: How to perform "sample" in chunks

2009-08-20 Thread Tal Galili
x) } randomize.by.column.a(xx) # END of - R example I would love for a better, faster, way of doing it. Thanks, Tal -- ---------- My contact information: Tal Galili Phone number: 972-50-3373767 FaceBook: Tal Galili My Blogs: http://www.r-

Re: [R] simple randomization question: How to perform "sample" in chunks

2009-08-20 Thread Tal Galili
atistical Data Center > Intermountain Healthcare > greg.s...@imail.org > 801.408.8111 > > > > -Original Message- > > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > > project.org] On Behalf Of Tal Galili > > Sent: Thursday, August 20, 2009 9:

Re: [R] How to create a random matrix

2009-08-25 Thread Tal Galili
Here is another nice way of doing it: replicate(10, rnorm(20)) # this will give you 10 columns of vectors with 20 random variables taken from the normal distribution. If any one got a faster way of doing this, please let me know. Tal galili On Tue, Aug 25, 2009 at 1:30 AM, Rolf Turner

Re: [R] Saving heatmaps as PDFs

2009-08-25 Thread Tal Galili
y=TRUE, trace="none",density.info="none", >symkey=FALSE, main=paste("Heatmap_", sample_output)) > > dev.off() > > -- > > Thanks, > Dorothy > > ______ > R-he

[R] Any one experienced working with git? (version control system)

2009-08-25 Thread Tal Galili
-- -- My contact information: Tal Galili Phone number: 972-50-3373767 FaceBook: Tal Galili My Blogs: http://www.r-statistics.com/ http://www.talgalili.com http://www.biostatistics.co.il [[alternative HTML version deleted]] __ R

Re: [R] Best R text editors?

2009-08-29 Thread Tal Galili
x27;t have experience in. Jedit - I am still waiting for Romain (from http://romainfrancois.blog.free.fr/) to release his connection of R to Jedit (What he showed me in useR 2009, was better then anything else I have seen until then) Best, Tal Galili On Thu, Aug 27, 2009 at 10:43 PM, Jon

[R] Combining: R + Condor in 2009 ? (+foreach maybe?)

2009-08-30 Thread Tal Galili
n "batch", and any "step by step" instructions (either by referring to links or explaining here) would be of great help. Thanks in advance, Tal ---------- My contact information: Tal Galili Phone number: 972-50-3373767 FaceBo

[R] foreach + snowfall for multicore situations

2009-09-02 Thread Tal Galili
it has some connection to snow). My final goal is to do some simple parallel simulations on my two processors. Thanks, Tal -- -- My contact information: Tal Galili Phone number: 972-50-3373767 FaceBook: Tal Galili My Blogs: http://www.r

Re: [R] foreach + snowfall for multicore situations

2009-09-02 Thread Tal Galili
> Hi Tal, > > On Sep 2, 2009, at 11:52 AM, Tal Galili wrote: > > Hello dear R community. >> I just started playing with the snowfall package (a wrapper for the snow >> package), and found it very convenient. >> (See also this great website: >> http://www.

Re: [R] a question for beginner

2009-09-02 Thread Tal Galili
//www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- ------ My contact information: Tal Galili Phone number: 972-50-3373767 FaceBook: Tal Galili My Blogs: http://www.r-statistics.com/ http://w

Re: [R] Two-ways anova / interaction

2009-09-04 Thread Tal Galili
ist > 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. > -- ------ My contact informatio

Re: [R] How to visualize paired t-test results?

2009-09-12 Thread Tal Galili
sing this function for CI plotting: http://finzi.psych.upenn.edu/R/library/plotrix/html/plotCI.html Best, Tal Galili On Sat, Sep 12, 2009 at 12:00 PM, johannes rara wrote: > I would like to know if you have any suggestions how to visualize the > results from a paired t-test (see th

Re: [R] R on Multi Core

2009-09-12 Thread Tal Galili
ml > and provide commented, minimal, self-contained, reproducible code. > -- ------ My contact information: Tal Galili Phone number: 972-50-3373767 FaceBook: Tal Galili My Blogs: http://www.r-statistics.com/ http://www.talgalili.com http://www.biostatistics.co.il [[alternative H

[R] is it possible: predict.lm on a matrix instead of a data.frame ?

2009-09-13 Thread Tal Galili
My contact information: Tal Galili Phone number: 972-50-3373767 FaceBook: Tal Galili My Blogs: http://www.r-statistics.com/ http://www.talgalili.com http://www.biostatistics.co.il [[alternative HTML version deleted]] __ R-help@r-project.org mailing

[R] How can I get "predict.lm" results with manual calculations ? (a floating point problem)

2009-09-13 Thread Tal Galili
uestion*: Can I reproduce more accurate results from the manual calculations (as the ones I might have gotten from predict.lm) ? Maybe some parameter to increase the precision of the computation ? Many thanks, Tal -- ---------- My contact informat

Re: [R] How can I get "predict.lm" results with manual calculations ? (a floating point problem)

2009-09-14 Thread Tal Galili
+ smallPosNum) + bigNegNum). They can also depend on whether > intermediate results are kept in CPU registers, which sometimes have higher > precision than 64 bits. Usually, they're nothing to worry about, which is > one of the major reasons that all.equal() has a non-zero default f

[R] How can I use foreach with snow, to allow multicore on windows XP ?

2009-09-14 Thread Tal Galili
! Tal -- -- My contact information: Tal Galili Phone number: 972-50-3373767 FaceBook: Tal Galili My Blogs: http://www.r-statistics.com/ http://www.talgalili.com http://www.biostatistics.co.il [[alternative HTML version deleted

Re: [R] What are the return values of aov?

2009-09-14 Thread Tal Galili
___ > 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, reproducible code. > -- -

Re: [R] Mantel test

2009-09-14 Thread Tal Galili
mmented, minimal, self-contained, reproducible code. > -- ---------- My contact information: Tal Galili Phone number: 972-50-3373767 FaceBook: Tal Galili My Blogs: http://www.r-statistics.com/ http://www.talgalili.com http://www.biostatistics.co.il [[alternative HTML version deleted]] _

Re: [R] How to calculate min of a dataset that contains empty column

2009-09-16 Thread Tal Galili
ng guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- -- My contact information: Tal Galili Phone number: 972-50-3373767 FaceBook: Tal Galili My Blogs: http://www.r-statistics.com/ http://www.talgalili.com ht

Re: [R] What is the time complexity of 'match()'?

2009-09-17 Thread Tal Galili
/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- ---------- My contact information: Tal Galili Phone number: 972-50-3373767 FaceBook: Tal Galili My Blogs: http://www.r-statistics.com/ http://www.

[R] How to solve: Error in * unused argument(s) ?

2010-02-10 Thread Tal Galili
Hi all, For some reason, I would like to use functions bellow (see example code bellow), but instead I get the following error message: *Error in foo2(...) : unused argument(s) (arg3 = 3)* #- # example code #- foo1 <- function(arg1,...) { print(arg1) foo2(

Re: [R] How to solve: Error in * unused argument(s) ?

2010-02-10 Thread Tal Galili
) | www.r-statistics.com (English) -- 2010/2/10 Uwe Ligges > > > On 10.02.2010 18:58, Tal Galili wrote: > >> Hi all, >> For some reason, I would like to use functions bellow (see exam

Re: [R] How to: highlight R syntax on webpages ?

2010-02-12 Thread Tal Galili
istics.com (English) -- On Fri, Nov 20, 2009 at 8:26 PM, Tal Galili wrote: > My question if in the Subject, but if to extend: I am specifically curious > about WordPress blogs. But any solution wil

Re: [R] How to: highlight R syntax on webpages ?

2010-02-12 Thread Tal Galili
ese plugins seem not support R language by default, so you may have > to write some code to declare the keywords and functions for R. And > also you can write another plugin by yourself if you like, it's not so > difficult. > > On Sat, Nov 21, 2009 at 2:26 AM, Tal Galili wrote: >

[R] What is your system for WorkFlow and Source Code Organizing in R ?

2010-02-20 Thread Tal Galili
Hello dear R users, Recently there has been several fascinating threads on the website stackoverflow regarding the subject of R WorkFlow best practices: - What best practices do you use for programming in R?

[R] How to: Compare Two dendrograms (Hierarchical Clusterings) ?

2010-02-21 Thread Tal Galili
Hello all, I wish to compare two dendrograms (representing Hierarchical Clusterings). My problems are several: 1) how do I manually create a dendrogram object ? That is, how can I reconstruct it as an "hclust" object that creates such a dendrogram, when all I have is the dendrogram image (but do

Re: [R] Exporting Graphs

2010-02-21 Thread Tal Galili
Hi Karthik, Please give a sample code of what it is that you are doing that is causing this. Also, have a look at: ?pdf Or ?png Cheers, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.tal

Re: [R] Exporting Graphs

2010-02-21 Thread Tal Galili
BTW - if you are using an image with little color (but many lines), I remember reading that png is better to use then jpeg. Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (He

Re: [R] plotrix 2.8-3

2010-02-22 Thread Tal Galili
Hi Jim, I just went thorough the demo(plotrix) , what amazing work you have done there, thank you! Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistic

Re: [R] Post-Hoc tests for Friedman Test?

2010-02-22 Thread Tal Galili
Hello David, I wanted to thank you for pointing to this code for performing posthoc friedman test. I just used this example to create a function to perform this test (and also added some illustrative flexible plots to the mix), here: http://www.r-statistics.com/2010/02/post-hoc-analysis-for-friedma

Re: [R] export tables to Excel files

2010-02-23 Thread Tal Galili
This post: http://www.r-bloggers.com/export-data-frames-to-multi-worksheet-excel-file-2/ Has a great overview... Contact Details:--- Contact me: tal.ga

Re: [R] Odp: export tables to Excel files

2010-02-23 Thread Tal Galili
p.s: >From the post I linked to earlier, I personally am using this code: # install.packages("RODBC") library(RODBC) save2excel <- function(x, t.name) sqlSave(xlsFile, x, tablename = t.name, rownames = FALSE, addPK = T) xlsFile <- odbcConnectExcel("C:\\output-tables.xls", readOnly = FALSE) temp

Re: [R] export tables to Excel files

2010-02-23 Thread Tal Galili
Hi Richard, Thanks for pointing this out. BTW - How would you use Rexcel to write several data frames into several sheets in excel ? Thanks! Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me:

Re: [R] Requirement

2010-02-23 Thread Tal Galili
Hi Chinna, Connecting to the database, have a look here for starting point: http://www.togaware.com/datamining/survivor/Database_Connection.html as for hist: ?hist As for forcasting for econometric data, start by looking here: http://cran.r-project.org/doc/contrib/Farnsworth-EconometricsInR.pdf

Re: [R] Remove missing observations

2010-02-24 Thread Tal Galili
Your friends are: na.omit and is.na The easiest way (I think) will be to have your data.frame organized so you have a row for each subject. and on the row, you check the outcome variables with "is.na" and create a subset of your data from that. And on that data, run your tests... Tal -

Re: [R] R error- "more columns than column names"

2010-02-24 Thread Tal Galili
I usually found this problem to be connected to spaces in the column names. Or, a wrong "sep" argument (for example "," instead of "\t" and the like) Let us know if it helped. Cheers, Tal Contact Details:--- Contact me: tal.ga

Re: [R] R error- "more columns than column names"

2010-02-24 Thread Tal Galili
That makes me wonder, if one could devise a function to check for common reasons for this error and report them. What do you think Erik (and other R users) ? I mean, just going through the R-help list in search of this error - could yield many common reasons to check for... Tal C

Re: [R] R error- "more columns than column names"

2010-02-24 Thread Tal Galili
Euphoria, Also just consider re-saving the file as a comma separated file (or another one that fits) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.

Re: [R] Sparse KMeans/KDE/Nearest Neighbors?

2010-02-25 Thread Tal Galili
Hello Manyu, I am guessing you refer to the netflix dataset. Try looking at ways to represent large data sets, that is, the list from here: http://cran.r-project.org/web/views/HighPerformanceComputing.html Here it is: *Large memory and out-of-memory data* - The biglm

[R] How to do: Correlation with "blocks" (or - "repeated measures" ?!) ?

2010-02-25 Thread Tal Galili
Hello dear R help group, I have the following setup to analyse: We have about 150 subjects, and for each subject we performed a pair of tests (under different conditions) 18 times. The 18 different conditions of the test are complementary, in such a way so that if we where to average over the test

Re: [R] data mining

2010-02-25 Thread Tal Galili
It depends on what you want to do. Start by looking at: http://cran.r-project.org/web/views/ There are also some nice startup tutorials on google, start from that... Tal Contact Details:---

Re: [R] How to add a title to represent four different plot in lm function

2010-02-25 Thread Tal Galili
Hi there, Try this: par(mfrow=c(2,2)) for( i in 1:4 ) plot(1:10) mtext("Title",side=3,outer=TRUE,padj=3) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biost

Re: [R] two questions for R beginners

2010-02-25 Thread Tal Galili
My biggest stumbling blocks to getting up and running with R was whenever I was lazy and impatient. The more you love R, the more it loves you back. Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 R

Re: [R] R and Wordpress

2010-02-26 Thread Tal Galili
Hi CH, My solution for this is to work only on the code editor, and never to move to the visual editor (once I put an R code inside it). Let me know if it works for you (and what is the link to your blog :) ) Cheers, Tal Contact Details:-

[R] R help question: How can we enable useRs to contribute corrections to help files faster ?

2010-02-28 Thread Tal Galili
Hello dear R users, *Here is the background for my question:* I just had a look at the help file for ? Yeast in the "HistData" package. In it, I found a small spelling mistake where the word "*c*istribution" was written instead (so I imagin) "*d*istribution". I thought maybe I should e-mail the

Re: [R] R help question: How can we enable useRs to contribute corrections to help files faster ?

2010-02-28 Thread Tal Galili
Duncan, As much as I agree with your remark in the general case, in this case - the annoyance is mostly for the next user and not the current one. If I spot a typo, after I figure what it had meant - my annoyance is over. I don't have any personal motivation to share the knowledge, asides from my

Re: [R] Three most useful R package

2010-03-02 Thread Tal Galili
Hi Ralf, My list would probably be: reshape + plyr lattice / ggplot2 and maybe Car / Hmisc BUT, I think the real answer would come from further use of the community of: http://crantastic.org/ (Or if that website could have collected and presented some data automatically...) Tal ---

[R] Change current plot window size. Or - saving/loading current device plotting history

2010-03-02 Thread Tal Galili
Hello dear R-help members, Very soon I am to give a lecture on R. And in that lecture I intend to move between: par(mfrow = c(1,1)) to par(mfrow = c(1,2)) back and forth. I anticipate this will damage the image proportions and will force me to resize the window. So far I have found it is possible

Re: [R] Change current plot window size. Or - saving/loading current device plotting history

2010-03-03 Thread Tal Galili
at 11:48 AM, Prof Brian Ripley wrote: > You haven't mentioned an OS nor a graphics device, So I will guess Windows > and windows(), since that is commonest device with a history. > > > On Wed, 3 Mar 2010, Tal Galili wrote: > > Hello dear R-help members, >> >&

Re: [R] Change current plot window size. Or - saving/loading current device plotting history

2010-03-03 Thread Tal Galili
ish) -- On Wed, Mar 3, 2010 at 12:13 PM, Prof Brian Ripley wrote: > On Wed, 3 Mar 2010, Tal Galili wrote: > > Thanks for replying Brian. >> Indeed, I am working on windows (XP). >> >> I tried doing: >> dev.new(record

Re: [R] Change current plot window size. Or - saving/loading current device plotting history

2010-03-03 Thread Tal Galili
-- 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) -- On Wed, Mar 3, 2010 at 2:00 PM, Tal Galili

Re: [R] cluster with mahalanobis distance

2010-03-03 Thread Tal Galili
when you create the distance function to put into the hclust, use: dist(x, method = "manhattan") Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatisti

Re: [R] cluster with mahalanobis distance

2010-03-03 Thread Tal Galili
ad me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Wed, Mar 3, 2010 at 11:16 PM, Tal Galili wrote: > when you create the distance function to put into th

[R] Why can't "apply" be used with "as.factor" on a data.frame ?

2010-03-07 Thread Tal Galili
Hi all, Let's say I have a data.frame and wants to turn each of it's columns into a factor. My instinct would be to use as.factor with apply. But this won't work, and result with a data.frame of characters. I found another solution for how to achieve this, but I would also like to understand - *WH

Re: [R] Why can't "apply" be used with "as.factor" on a data.frame ?

2010-03-07 Thread Tal Galili
urns a > matrix. See colwise in the plyr package for a function that works > column wise on a data frame, returning a data frame. > > Hadley > > On Sun, Mar 7, 2010 at 11:07 AM, Tal Galili wrote: > > Hi all, > > > > Let's say I have a data.frame and wants t

[R] Is there an equivalence of lm's “anova ” for an rpart object ?

2010-03-07 Thread Tal Galili
Simple example: # Classification Tree with rpart library(rpart) # grow tree fit <- rpart(Kyphosis ~ Age + Number + Start, method="class", data=kyphosis) Now I would like to know how can I measure the "importance" of each of my three explanatory variables (Age, Number, Start) in the model

Re: [R] Is there an equivalence of lm's "anova" for an rpart object ?

2010-03-08 Thread Tal Galili
--- On Mon, Mar 8, 2010 at 4:52 PM, Liaw, Andy wrote: > One way to do it (no p-values) is explained in the original CART book. > You basically add up all the "improvement" (in fit$split[, "improve"]) > due to each splitting variable. > > And

Re: [R] Transfer R workspace on another PC

2010-03-09 Thread Tal Galili
Hi Eleni, I have no answers, but a few questions: 1) What is the size of the Rdata ? 2) Did you try to restart the computer and then load the file again (it solved the problem for me once). 3) Is this you first attempt, or did you manage to do it in the past and only now failed ? Best, Tal --

Re: [R] Monetary support to the R-project (Was: Re: Executable for Production Use)

2010-03-09 Thread Tal Galili
I would second the request/ be curious to know if this might be implemented. Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www

[R] How (and where) to get aligned tRNA sequences (and import/align it using R)

2010-03-11 Thread Tal Galili
Hi all, I already posted this to seqinr-fo...@lists.r-forge.r-project.org but since (so far) no reply was given, I decided to try my luck in this list too. Dear list. I wish (for my thesis work), to import tRNA data into R and have it aligned. My questions are: 1) What resources can I use for t

[R] A link in the R-project.org website is broken, who do I report this to ?

2010-03-13 Thread Tal Galili
Hi, The link in the sentence: "We have started to collect information about local UseR Groups in the R Wiki ." Has a broken link to: UseR Groups

Re: [R] Form using R

2010-03-13 Thread Tal Galili
Hi Nilza, I think your solution should be to create a google spreadsheet and then read it. Here is an example code for reading a google spreadsheet: supplements.data.0 <- read.csv("http://spreadsheets.google.com/pub?key=0Aqe2P9sYhZ2ndFRKaU1FaWVvOEJiV2NwZ0JHck12X1E&output=csv";) I used this tri

Re: [R] Form using R

2010-03-13 Thread Tal Galili
Hi Nilza, I just wrote a more detailed answer to your question in the following post: Google spreadsheets + google forms + R = Easily collecting and importing data for analysis

[R] What can I use instead of ks.test for the binomial distribution ?

2010-03-13 Thread Tal Galili
Hello all, A friend just showed me how ks.test fails to work with pbinom for small "size". Example: x<-rbinom(1,10,0.5) x2<-rbinom(1,10,0.5) ks.test(x,pbinom,10,0.5) ks.test(x,pbinom,size = 10, prob= 0.5) ks.test(x,x2) The tests gives significant p values, while the x did come from bino

Re: [R] What can I use instead of ks.test for the binomial distribution ?

2010-03-13 Thread Tal Galili
972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Sat, Mar 13, 2010 at 10:04 PM, David Winsemius wrote: > > On Mar 13,

[R] Is this a bug (or a feature) in hist(x)$density ??

2010-03-13 Thread Tal Galili
Hi all, A friend send me a question on why does this: x<-rpois(100,1) sum( hist(x)$density ) Gives out "2" I tried this: sum( hist(x, freq =T)$density ) It didn't help. Then he came back with the following insight: # with breaks b<-c(0,0.9,1:8) sum(hist(x,breaks=b)$density) # Much more then

Re: [R] Two questions, first about contingency tables, and second about table () and data.frame (), from a visually impaired user.

2010-03-13 Thread Tal Galili
ies of the three categories of > the dependent variable. > >table(birth,mental.health) > I get an error "all arguments must have the same length" > when I use > data.frame(birth,mental.health) > I get "arguments imply differing number of rows." > >

Re: [R] Is this a bug (or a feature) in hist(x)$density ??

2010-03-13 Thread Tal Galili
7;d recommend > reading through Wikipedia's article on the Riemann integral, you may be > enlightened. > http://en.wikipedia.org/wiki/Riemann_integral > > HTH, > Stephan > > > Tal Galili schrieb: > >> Hi all, >> >> A friend send me a question on w

[R] How to parse a string (by a "new" markup) with R ?

2010-03-16 Thread Tal Galili
Hello all, For some work I am doing on RNA, I want to use R to do string parsing that (I think) is like a simplistic HTML parsing. For example, let's say we have the following two variables: Seq <- "GCCTCGATAGCTCAGTTGGGAGAGCGTACGACTGAAGATCGTAAGGtCACCAGTTCGATCCTGGTTCCA" Str <- ">

Re: [R] How to parse a string (by a "new" markup) with R ?

2010-03-16 Thread Tal Galili
at you want to parse? Is each one a self contained sequence like > you show in your example, or do they go on for thousands of characters? Is > there always at least one '.' between stems? A full set of rules as to how > the parsing should be done would be useful. Do you have

Re: [R] How to parse a string (by a "new" markup) with R ?

2010-03-16 Thread Tal Galili
;), Str2) > > pat <- > > "^(}*)([.]*)(>*)([.]*)(<*)([.]*)(>*)([.]*)(<*)([.]*)(>*)([.]*)(<*)([.]*)({*)([.]*)$" > lens <- sapply(strapply(Str3, pat, c)[[1]], nchar) > tokens <- unlist(read.fwf(textConnection(Seq), lens, as.is = TRUE)) > clos

[R] Is there a way to edit a specific line in a function (e.g: doing function->text->edit->function) ?

2010-03-16 Thread Tal Galili
Hello, Let's say we have the following function: foo <- function(x) { line1 <- x line2 <- 0 line3 <- line1 + line2 return(line3) } And that we want to change the second line to be: line2 <- 2 How would you do that? The two ways I know of are either to use fix(

Re: [R] Is there a way to edit a specific line in a function (e.g: doing function->text->edit->function) ?

2010-03-16 Thread Tal Galili
) -- On Tue, Mar 16, 2010 at 11:34 PM, Henrique Dallazuanna wrote: > Try this: > > body(foo)[[grep('^line2', body(foo))]][[3]] <- 2 > > On Tue, Mar 16, 2010 at 6:31 PM, Tal Galili wrote: > >

Re: [R] How can I save the result for goodness of fit test

2010-03-16 Thread Tal Galili
Hi pinusan, If it is possible, please add the code you used and output so to help people here help you. In general, take the object you got, put it inside "str" and see where you statistic is (but for us to write the code, it would help if you where to add it to your massage) Best, Tal ---

Re: [R] Is there a way to edit a specific line in a function (e.g: doing function->text->edit->function) ?

2010-03-16 Thread Tal Galili
(English) -- On Tue, Mar 16, 2010 at 11:47 PM, Duncan Murdoch wrote: > On 16/03/2010 5:31 PM, Tal Galili wrote: > >> Hello, >> >> Let's say we have the following func

Re: [R] Summing daily data for each year

2010-03-16 Thread Tal Galili
HI Santosh, The simplest way I can think of is (after you import the data) to do: tapply(Zvo$V2, YEAR, sum) The question is how to get "YEAR". You could do that if you know how to play with date objects. Another option is to do something like: YEAR <- as.data.frame(strsplit(Zvo$V2, "-"))[1,] F

Re: [R] How to parse a string (by a "new" markup) with R ?

2010-03-17 Thread Tal Galili
TS-8 > International Conference on Teaching Statistics > http://icots8.org > > > > > -Original Message- > > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > > project.org] On Behalf Of Gabor Grothendieck > > Sent: Tuesday, March 16, 201

Re: [R] R front end help

2010-03-18 Thread Tal Galili
Also have a look at deducer: http://www.deducer.org/manual.html 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

  1   2   3   4   5   6   7   8   >