[R] minor allele frequency comparison

2011-12-08 Thread Scott Harding
Hi all, We are using two methods to identify SNPs. One is based on resequencing the genome and aligning the reads to the sequenced genome to identify SNPs (data available for 44 individuals). Another is based on SNP array with selected loci (3 loci, 870 individuals). I want to compare the

Re: [R] R/parallel

2011-12-08 Thread Prof Brian Ripley
On Thu, 8 Dec 2011, Scott Raynaud wrote: Looks like this requires use of foreach and??lots of extra coding.?? R/parallel only requires that the loop be bracketed with the code to start the parallel processing-about 4-5 lines.?? Seems??a lot?? easier to me.?? If I were to go to the trouble of wri

[R] Need to calculate standard deviation by groups

2011-12-08 Thread Zsuzsanna Papp
Hello, please help me with this basic question, I already spent two days on the internet and textbooks trying to come up with an answer... I will simplify my question to an example, rather than base it on the original variable names. I have a Dataset with 4 variables, 2 cases. Variable A is a

[R] Help understanding cutree used for Dunn Index

2011-12-08 Thread Kerry
Basic question: Is it correct to assume that when using cutree to set the # clusters (say k=4), cutree determines the clusters by the largest distances among all potential clusters? I've read the R help for cutree and am using it to define the number of groups to obtain Dunn Index scores (using c

[R] profile likelihood

2011-12-08 Thread plocq
Hi, I try to use the function profile() of the SpatialExtremes' package to obtain the profile likelihood of parameters for an extreme values fit based on Poisson process : fit<-fpot(data, threshold, model="pp", npp=365). But when I call "profile(fit)", I obtain the following error (even if I pre

[R] Align expression and text in mtext()

2011-12-08 Thread Remko Duursma
Dear R-helpers, I have trouble aligning an expression with a subscript, and text, in margin text: par(mar=c(6,6,1,1)) b <- barplot(1:3) mtext(c("A","B","C"), at=b, side=1, line=1, cex=1.3) mtext(expression(italic(C)[a]~(more~text)), at=0, line=1, side=1,cex=1.3) As explained in the help files

[R] R packages for pathway analysis?

2011-12-08 Thread karena
What R packages do you guys use for 'pathway analysis'? By 'pathway analysis', I mean to check the enrichment of certain genes in KEGG | GO pathways. Thank you, Karena -- View this message in context: http://r.789695.n4.nabble.com/R-packages-for-pathway-analysis-tp4175258p4175258.html Sent from

Re: [R] R/parallel

2011-12-08 Thread Scott Raynaud
Looks like this requires use of foreach and lots of extra coding.  R/parallel only requires that the loop be bracketed with the code to start the parallel processing-about 4-5 lines.  Seems a lot  easier to me.  If I were to go to the trouble of writing a lot of new code, it seems that rec

Re: [R] nice report generator?

2011-12-08 Thread Duncan Murdoch
On 11-12-08 1:37 PM, Tal Galili wrote: Helloe dear Duncan, Gabor, Michael and others, Do you think it could be (reasonably) possible to create a bridge between a "cast_df" object from the {reshape} package into a table in Duncan's new {tables} package? I'm not that familiar with the reshape pa

[R] what is the difference between using function predict() and coef() in prediction

2011-12-08 Thread tony333
i do not know what is the difference between predict() and coef() i use the two function give me different result zz = predict(xy.lm,list(T8=T8)) ss = coef(xy.lm)[1]+(coef(xy.lm)[2])*T8 where is t8 is the data used in prediction did not use in the fitting in training sample where every sample is 1

Re: [R] dcc in 'bootRes' package

2011-12-08 Thread mjb
I just ran into the same problem. When you read in the DC data, set the year column as the row names instead of the first column. For whatever reason this worked for me. I hope if works for you. DC<-read.table("Dalton.txt", header=T, row.names = 1) climate<-read.table("climate.txt", header=T) d

[R] optimize()

2011-12-08 Thread dnz.marcio
Hi! I have a difficulty in the use of function optimize(). Could you help me? I want to maximize this function: # Logaritmo da distribuição condicional de alpha[i] lp_alphai <- function(alphai, i, beta, tau, N){ t1 <- (N[i+1] - N[i])*log(alphai) t2 <- - (N[i+1] - N[i])*alphai*log(beta[i])

[R] profile likelihood

2011-12-08 Thread plocq
Hi, I try to use the function profile() of the SpatialExtremes' package to obtain the profile likelihood of parameters for an extreme values fit based on Poisson process : fit<-fpot(data, threshold, model="pp", npp=365). But when I call "profile(fit)", I obtain the following error (even if I pre

Re: [R] read.table performance

2011-12-08 Thread Gene Leynes
Now this is interesting: Here's a list of how long it took to read the same file in various versions of R: R version 2.10.1 (2009-12-14) 3.97 R version 2.12.0 (2010-10-15)24.53 R version 2.13.0 (2011-04-13)24.48 R version 2.14.0 (2011-10-31) 3.75 I think that the even numbered re

[R] profile likelihood

2011-12-08 Thread plocq
Hi, I try to use the function profile() of the SpatialExtremes' package to obtain the profile likelihood of parameters for an extreme values fit based on Poisson process : fit<-fpot(data, threshold, model="pp", npp=365). But when I call "profile(fit)", I obtain the following error (even if I pre

[R] How to load the data set from an URL Link?

2011-12-08 Thread Henser
My problem is very easy, but it took me hours without a solution. So, I have to take any data set from UCI repository website for example this one which is about consensus income: http://archive.ics.uci.edu/ml/datasets/Census+Income And here is the data folder: http://archive.ics.uci.edu/ml/mac

[R] Help with study guide for R exam

2011-12-08 Thread 343GS
Hi there. I have a final exam coming up in a class that is heavily based in the R programming language. The teacher has provided to us a few questions to study in preparation for the exam. I was looking to see if anyone could help answer any or all of these questions. Your help is extremely appreci

[R] profile likelihood

2011-12-08 Thread plocq
Hi, I try to use the function profile() of the SpatialExtremes' package to obtain the profile likelihood of parameters for an extreme values fit based on Poisson process : fit<-fpot(data, threshold, model="pp", npp=365). But when I call "profile(fit)", I obtain the following error (even if I pre

[R] cannot access the functions in the package

2011-12-08 Thread Weizeng Ni
hi, I am using the package of "Fslector" which contains a function named "information.gain". I want to see the detailed code of this function. the result shows > information.gainfunction (formula, data) { information.gain.body(formula, data, type = "infogain") } When I then try to see the co

Re: [R] nice report generator?

2011-12-08 Thread Michael
How to directly generate Pivot tables in R, or generate Pivot tables in Excel from R ? Thx On Thu, Dec 8, 2011 at 12:37 PM, Tal Galili wrote: > Helloe dear Duncan, Gabor, Michael and others, > > Do you think it could be (reasonably) possible to create a bridge between > a "cast_df" object fro

[R] bwplot title size

2011-12-08 Thread g_l
Using the statement below to draw a plot. The title size doesn't seem to change regardless of what value I put in for cex.main. How do I reduce the size of the title? #print distributions by Month bwplot(RoomsInUse ~ Hour | Month, scales=list(x=list(rot=90)), horizontal=FALSE,las=2,main=title,

Re: [R] Update MS Windows PATH variable based on a R script

2011-12-08 Thread Yihui Xie
Probably cool but "evil", I should say, but I do not have a better choice at the moment. This script does not take the R version into account (e.g. after you update R, your new version may not be able to get into PATH via this script), so you may consider improving it a little bit. Please contact

Re: [R] profile likelihood

2011-12-08 Thread B77S
Try posting this question at least 1 more time. plocq wrote > > Hi, > > I try to use the function profile() of the SpatialExtremes' package to > obtain the profile likelihood of parameters for an extreme values fit > based on Poisson process : > > fit<-fpot(data, threshold, model="pp", npp=

[R] stop messages

2011-12-08 Thread nur mohd
Dear sir how to stop the messages from r-help to appear in my email.tq __ 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, m

Re: [R] read.table question

2011-12-08 Thread Robert Baer
Hello All, This works, results <- read.table("plink.txt",T) while this doesn't. results <- read.table("plink.txt") The T is the value for the second parameter which you show from the help file printout you looked at to be header. Thus, you are writing in short cut: results

[R] Goodness of Fit for Copula

2011-12-08 Thread cahaya iman
Dear All, I'm now working on Archimedean copulas and try to test the goodness of fit. Which packages I should use? I have Clayton copula with parameter (5.35) and Frank (19.5). I found this build function wrote by Yan and Ivan via R Packages, but I'm not sure the matrix for x? Please advice.

Re: [R] survreg() provides same results with different distirbutions for left censored data

2011-12-08 Thread Thomas Lumley
On Thu, Dec 8, 2011 at 3:55 AM, ifejobi wrote: > Hello, > > I'm working with some left censored survival data using accelerated failure > time models.  I am interested in fitting different distributions to the data > but seem to be getting the same results from the model fit using survreg > regard

Re: [R] Relationship between covariance and inverse covariance matrices

2011-12-08 Thread Søren Højsgaard
Your question is not all that R-related, but inverse covariance matrices with zero entries corresponds to conditional independence restrictions in the multivaritate normal distribution. Such inverse covariance matrices are key ingredients in graphical Gaussian models (also known as covariance se

Re: [R] Relationship between covariance and inverse covariance matrices

2011-12-08 Thread Bert Gunter
What does this have to do with R? Is this homework? I suggest you post to some sort of math list. Perhaps others will have more specific suggestions where. -- Bert On Thu, Dec 8, 2011 at 2:42 PM, Vivian Shih wrote: > Hi, > >   I've been trying to figure out a special set of covariance matrices

[R] Relationship between covariance and inverse covariance matrices

2011-12-08 Thread Vivian Shih
Hi, I've been trying to figure out a special set of covariance matrices that causes some symmetric zero elements in the inverse covariance matrix but am having trouble figuring out if that is possible. Say, for example, matrix a is a 4x4 covariance matrix with equal variance and z

Re: [R] Update MS Windows PATH variable based on a R script

2011-12-08 Thread Janko Thyson
This is a very very very late follow up, but I remember asking this question and just stumbled across an answer by Yihui. Check his file 'add-R-path-win.R' script which you can find at https://github.com/yihui/lyx/blob/master/README.md Very cool, thanks Yihui. Regards, Janko On 29.06.2011 20

Re: [R] nice report generator?

2011-12-08 Thread Tal Galili
Hi Michael, If you are talking about organizing the data - then google and read more about the reshape package. If you want THE pivot table done in excel from R - you'll need to follow the RExcel path. (I personally prefer reshape) Contact Details:

[R] prop.test() and the simultaneous confidence interval for multiple proportions in R

2011-12-08 Thread angelo.arc...@virgilio.it
Dear list members, I want to perform in R the analysis "simultaneous confidence interval for multiple proportions", as illustrated in the article of Agresti et al. (2008) "Simultaneous confidence intervals for comparing binomial parameter", Biometrics 64, 1270-1275. If I am not wrong the R func

Re: [R] Behavior of apply()

2011-12-08 Thread R. Michael Weylandt
It's because your first example produces answers of varying length so there's no natural way to coerce it to a matrix. Your second has a consistent length so the result can be made into a matrix. Michael On Thu, Dec 8, 2011 at 4:30 PM, Doran, Harold wrote: > Suppose I have the following matrix >

Re: [R] Behavior of apply()

2011-12-08 Thread Marc Schwartz
On Dec 8, 2011, at 3:30 PM, Doran, Harold wrote: > Suppose I have the following matrix > >> class(cov_50) > [1] "matrix" >> cov_50 > [,1] [,2] > [1,] 0.3201992 2.308084 > [2,] 6.7312928 5.719641 > > I then use the following function via apply and get the desired output, a list > >

[R] Behavior of apply()

2011-12-08 Thread Doran, Harold
Suppose I have the following matrix > class(cov_50) [1] "matrix" > cov_50 [,1] [,2] [1,] 0.3201992 2.308084 [2,] 6.7312928 5.719641 I then use the following function via apply and get the desired output, a list signif <- function(x) which(abs(x) > 1.96) apply(cov_50, 1, signif) >

[R] R- CollocInfer data

2011-12-08 Thread Vassily Shvets
Hello, I'm trying to go through the analyses in the CollocInfer introductory pdf file, particularly the NSdata. I seem to have loaded everything correctly but can't find any of the data sets for this package. Has anyone else had this experience? regards, S ___

Re: [R] lda output missing

2011-12-08 Thread David L Carlson
The Proportion of trace will only show up if there are two or more linear discriminant functions. With two groups you have only one function, so the Proportion of trace is 1.0 for that function. group1 <- data.frame(Group="G1", Var1=rnorm(50), Var2=rnorm(50)) group2 <- data.frame(Group="G2", Var1=

Re: [R] anova analysis on factors...

2011-12-08 Thread David Winsemius
On Dec 8, 2011, at 3:28 PM, Michael wrote: Hi all, If we wanted to study the effect on the mean of the hourly data based on the hours within a day... and we wanted to do Anova analysis... We have two choices: Who is "we" and how were these constraints imposed? Please see below: Why

Re: [R] read.table question

2011-12-08 Thread Duncan Murdoch
On 08/12/2011 3:28 PM, Pavan G wrote: Hello All, This works, results<- read.table("plink.txt",T) while this doesn't. results<- read.table("plink.txt") Make sure your data frame contains columns CHR, BP, and P What does adding the "T" in read.table do? Which argument does this correspond to?

Re: [R] anova analysis on factors...

2011-12-08 Thread Sarah Goslee
And a further problem with both approaches: is 11pm (23) really that different from 1am? On Thu, Dec 8, 2011 at 3:28 PM, Michael wrote: > Hi all, > > If we wanted to study the effect on the mean of the hourly data based on > the hours within a day... > > and we wanted to do Anova analysis... > >

[R] anova analysis on factors...

2011-12-08 Thread Michael
Hi all, If we wanted to study the effect on the mean of the hourly data based on the hours within a day... and we wanted to do Anova analysis... We have two choices: Please see below: Why are these two approaches giving very different p-values? And which one shall I use? Thanks a lot! 1. tre

[R] read.table question

2011-12-08 Thread Pavan G
Hello All, This works, results <- read.table("plink.txt",T) while this doesn't. results <- read.table("plink.txt") Make sure your data frame contains columns CHR, BP, and P What does adding the "T" in read.table do? Which argument does this correspond to? I tried searching for it but didn't fin

Re: [R] Compilation error of R-2.14.0 on Mac OS 10.7.2

2011-12-08 Thread Roebuck,Paul L
Although I didn't try it, generally adding Fink to the mix is WRONG. Don't try to mix Fink and anything else. On 12/8/11 11:37 AM, "Jean-Baptiste Marquette" wrote: > Dear R gurus, > > I attempt to install the latest version of R from source on my MacBook Pro, > using latest versions of Xcode a

Re: [R] Find x value of density plots

2011-12-08 Thread Pavan G
Vielen Dank! On Tue, Dec 6, 2011 at 1:48 PM, Duncan Murdoch wrote: > On 06/12/2011 1:42 PM, Pavan G wrote: > >> Hello All, >> >> How do I find the x value at max density for say, this plot >> plot(density(rnorm(1000))) >> > > d <- density(rnorm(1000)) > plot(d) > > abline(v=d$x[which.max(d$y)]) >

Re: [R] simple fit

2011-12-08 Thread Rolf Turner
If one knows y, x, and a, and wishes to estimate b in y = a*x + b (+ random error presumably) then surely the simplest procedure is b.hat <- mean(y-a*x) Is it not so? cheers, Rolf On 09/12/11 08:09, Ben Bolker wrote: R. Michael Weylandt gmail.com> writes: Fit y-b w

Re: [R] simple fit

2011-12-08 Thread Ben Bolker
R. Michael Weylandt gmail.com> writes: > Fit y-b without an intercept? (which you do by adding "+ 0" or "- 1" > to the model formula) Not sure if this is the optimal result, but it > will give you a pretty reasonable answer. This seems backward. The OP has the slope and wants the intercept. >

Re: [R] R/parallel

2011-12-08 Thread Tal Galili
Hi Scott, Why not use the doSMP package from REvolution? http://www.r-statistics.com/2010/04/parallel-multicore-processing-with-r-on-windows/ Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: w

Re: [R] nice report generator?

2011-12-08 Thread Tal Galili
Helloe dear Duncan, Gabor, Michael and others, Do you think it could be (reasonably) possible to create a bridge between a "cast_df" object from the {reshape} package into a table in Duncan's new {tables} package? That would allow one to do pivot-table like operations on an object using {reshape}

Re: [R] map at fips level using multiple variables

2011-12-08 Thread Albyn Jones
since each county gets a single color, you would need to combine two color schemes. I am skeptical that this will work well, but you could try using rgb(). For example - code one variable using the red component, the other using the blue component. albyn On Wed, Dec 07, 2011 at 11:14:27PM -0500

Re: [R] Compilation error of R-2.14.0 on Mac OS 10.7.2

2011-12-08 Thread Marc Schwartz
On Dec 8, 2011, at 11:37 AM, Jean-Baptiste Marquette wrote: > Dear R gurus, > > I attempt to install the latest version of R from source on my MacBook Pro, > using latest versions of Xcode and gfortran for Lion and configure options: > > ./configure --with-libintl-prefix=/sw --enable-R-shlib (t

[R] R/parallel

2011-12-08 Thread Scott Raynaud
 I want to take advantage of my multicore CPU to speed up a loop in a simulation program.  I didn’t write the code, but the iterations appear independent to me, at least in the sense that the results of one loop do not depend on previous ones.  Right now I’m relegated to a Windows box that runs

Re: [R] nice report generator?

2011-12-08 Thread Duncan Murdoch
On 07/12/2011 11:58 PM, Gabor Grothendieck wrote: On Wed, Dec 7, 2011 at 11:42 PM, Michael wrote: > Do you have an example...? Thanks a lot! See this video: http://www.woopid.com/video/1388/Format-as-Table That shows how to manipulate tables in Excel, but it doesn't really end up with some

Re: [R] read.table performance

2011-12-08 Thread Gene Leynes
By the way, here's my original session information. (I can never remember the name of that command when I want it). It's strange that Petr is having the problem with 2.14. It's relatively fast on my machine with R 2.14. > sessionInfo() R version 2.13.0 (2011-04-13) Platform: i386-pc-mingw32/i38

Re: [R] How to generate bivariate exponential distribution?

2011-12-08 Thread curious_programmer
thanks for the code, Petr. - what's the PDF of the bivariate exponential behind your code? - what sampling method are you using to generate these random numbers? is it rejection sampling? thanx -- View this message in context: http://r.789695.n4.nabble.com/How-to-generate-bivariate-exponent

[R] Compilation error of R-2.14.0 on Mac OS 10.7.2

2011-12-08 Thread Jean-Baptiste Marquette
Dear R gurus, I attempt to install the latest version of R from source on my MacBook Pro, using latest versions of Xcode and gfortran for Lion and configure options: ./configure --with-libintl-prefix=/sw --enable-R-shlib (this last option necessary to further install the Rpy Python package) I

Re: [R] How to plot multiple graphs in one go?

2011-12-08 Thread Bert Gunter
Sigh R FAQ 7.22 -- Bert On Thu, Dec 8, 2011 at 8:59 AM, Kaiyin Zhong wrote: > I am trying to do this, but it won't work: > >> library(lattice) >> elemconc = data.frame(expand.grid(id=1:20, geno=c('exp', 'wt'), > region=c('cor', 'cr', 'spine'), elem=c('fe', 'cu', 'zn')), conc=rnorm(360, > 10

Re: [R] lda output missing

2011-12-08 Thread Sarah Goslee
That's odd. You don't provide a reproducible example, but using a built-in dataset (from the help for lda) I get the Proportion of Trace given by the print.lda method. library(MASS) Iris <- data.frame(rbind(iris3[,,1], iris3[,,2], iris3[,,3]), Sp = rep(c("s","c","v"), rep(50,3))) train <- sample(1

Re: [R] help wrapping findInterval into a function

2011-12-08 Thread Steve E.
Michael (and others) - Right, 'within' did work, I had placed it in the wrong location previously, which your example code made clear. I wrapped several of these functions within a function to address all the desired flags in a single pass (probably horribly inefficient but it works). Thanks agai

Re: [R] R on the cloud - Windows to Linux

2011-12-08 Thread Ben quant
Due to my lack of experience with R and the cloud I am leery about attempting any patch dev for Windows compatibility. I think it would be cool to contribute at some point, but I think I am still too new. Anyway, I'm looking into using my company's linux server via Putty and use that as my local m

[R] lda output missing

2011-12-08 Thread David Lutz
Hello everyone, I am working on a linear discriminant analysis and am having issues finding the full output of my lda. Specifically, there is no reporting of the Proportion of Trace that is a normal output of the procedure. I'm using a csv file and everything is reading in correctly. I've looked a

[R] How to plot multiple graphs in one go?

2011-12-08 Thread Kaiyin Zhong
I am trying to do this, but it won't work: > library(lattice) > elemconc = data.frame(expand.grid(id=1:20, geno=c('exp', 'wt'), region=c('cor', 'cr', 'spine'), elem=c('fe', 'cu', 'zn')), conc=rnorm(360, 10)) > elemconc$geno = factor(elemconc$geno) > elemconc$region = factor(elemconc$region) > for

Re: [R] Representation of scientific units

2011-12-08 Thread Richard M. Heiberger
There are at least two partial solutions to the question. length units are handled in the unit function in the grid package. ?grid:::unit time units are handled in the lubridate package Garrett Grolemund, Hadley Wickham (2011). Dates and Times Made Easy with lubridate. Journal of Statistical

Re: [R] nice report generator?

2011-12-08 Thread Richard M. Heiberger
Michael, Pivot tables in Excel can be sent directly to R with RExcel. rcom.univie.ac.at See our paper at UseR! 2011 for an example and application. The Pivot Table transfer is illustrated on page 4. Heiberger, R., Neuwirth, E., UserR! 2011, "Graphical Syntax for Structables and their Mosaic Plo

Re: [R] R on the cloud - Windows to Linux

2011-12-08 Thread Whit Armstrong
> I don't know where to start because, it looks like rzmq is not available for > Windows and it looks like AWS.tools and deathstar depend on rzmq, so by Hence my reference to work. patches welcome. > Will using a > local Windows box continue to be an issue as I progress with R and EC2? I've > ru

Re: [R] R on the cloud - Windows to Linux

2011-12-08 Thread Ben quant
Thank you! I subscribed to R-hpc, thanks. I replied and I'm waiting for list approval. I am willing to work, but I'm not sure what to do to get these to work. I literally started using the cloud yesterday and R a couple months ago. I don't know where to start because, it looks like rzmq is not

Re: [R] Representation of scientific units

2011-12-08 Thread David Winsemius
On Dec 8, 2011, at 9:22 AM, Stephen Eglen wrote: Has anyone got a neat way in R to handle scientific units along with numeric vectors? Not really. There is limited support for conversions as well. I have wondered about this after addressing a similar question on Stack Overflow: http:/

Re: [R] simple fit

2011-12-08 Thread R. Michael Weylandt
Fit y-b without an intercept? (which you do by adding "+ 0" or "- 1" to the model formula) Not sure if this is the optimal result, but it will give you a pretty reasonable answer. Michael On Thu, Dec 8, 2011 at 10:52 AM, Alaios wrote: > Dear all, >  I have a formula of the form > y=ax+b > I know

[R] simple fit

2011-12-08 Thread Alaios
Dear all,  I have a formula of the form y=ax+b I know everything except b. How I can ask R to do fitting to find only the value of b? I already know the lm() but it always return both an intercept point (b) and the a. What should I do ? I would like to thank you in advance for your help B.R Al

[R] Date object and origin BC

2011-12-08 Thread smu
hi everybody, is this intended behaviour? > x <- as.Date('0-01-01') > as.Date(as.character(x)) [1] "0-01-01" > a <- x - 365 > as.Date(a) [1] "-1-01-01" > as.Date(as.character(a)) Error in charToDate(x) : character string is not in a standard unambiguous format Is this a bug? I found this, whil

Re: [R] rjags in a Windows 7 64 bits machine

2011-12-08 Thread Filipe Ferminiano Rodrigues
Thanks for the help. I installed R again, but without the i386 files and now the program is running perfectly! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] nice report generator?

2011-12-08 Thread Michael
Hi folks, In addition to Excel style tables, it would be great to have Excel 2010 Pivot Table in R... Any thoughts? Thanks a lot! On Thu, Dec 8, 2011 at 4:49 AM, Tal Galili wrote: > I think it would be *great *if an extension of Duncan's new "tables" > package could include themes and switche

Re: [R] matching using "which"

2011-12-08 Thread R. Michael Weylandt
Here's one that is perhaps a little simpler: simply drop the which and use logical indexing. dat <- matrix(1:6, 2); colnames(dat) <- c("A","B","A") dat[, colnames(dat) %in% "A"] dat[, colnames(dat) %in% "B"] # Note that you may want drop = FALSE dat[, colnames(dat) %in% "C"] dat[, !(colnames(dat

Re: [R] help about Hannan-Rissanen model selection

2011-12-08 Thread Uwe Ligges
Never ever cross post!!! On 08.12.2011 14:51, MATEMATIK ISTATISTIK wrote: Dear all, I am sorry , I have not enough English or I am fool to understand the helping system 1- if someone has written the code for Hannan-Rissanen model selection in ARMA models, how can I find this R module or the

Re: [R] rjags in a Windows 7 64 bits machine

2011-12-08 Thread Uwe Ligges
Works for me: Do you have the most recent Jags version? Is this 32-bit or 64-bit R? Uwe Ligges On 08.12.2011 11:42, Filipe Ferminiano Rodrigues wrote: Hi. I was trying to follow this rjags tutorial (example 1): http://www.johnmyleswhite.com/notebook/2010/08/20/using-jags-in-r-with-the-rjags-p

Re: [R] Whites test

2011-12-08 Thread Achim Zeileis
On Thu, 8 Dec 2011, RToss wrote: Hi all! I am quite new to R, and therefore in the need for som help. I want to perform a Whites test for my OLS, how is this accomplished? You can use bptest() from the "lmtest" package and then supplying interactions and quadratic terms of all regressors for

[R] R 2.14.1 scheduled for December 22

2011-12-08 Thread Peter Dalgaard
This is to announce that we plan to release R version 2.14.1 on Friday, December 22, 2011. Those directly involved should review the generic schedule at http://developer.r-project.org/release-checklist.html The source tarballs will be made available daily (barring build troubles) via http://cra

Re: [R] Whites test

2011-12-08 Thread peter dalgaard
On Dec 8, 2011, at 14:32 , RToss wrote: > Hi all! > > I am quite new to R, and therefore in the need for som help. > I want to perform a Whites test for my OLS, how is this accomplished? > > Thanks a lot! > > /Richard > Seems that there is a white.test in the bstats package. (And also a bp.t

Re: [R] sum of deviations from the weighted mean

2011-12-08 Thread andrija djurovic
Thank and sorry i should check this before asking the question. Andrija On Thu, Dec 8, 2011 at 3:20 PM, R. Michael Weylandt < michael.weyla...@gmail.com> wrote: > R FAQ 7.31 I'd imagine. (Floating point arithmetic and limitations thereof) > > Michael > > On Dec 8, 2011, at 9:15 AM, andrija djur

[R] help about Hannan-Rissanen model selection

2011-12-08 Thread MATEMATIK ISTATISTIK
Dear all, I am sorry , I have not enough English or I am fool to understand the helping system 1- if someone has written the code for Hannan-Rissanen model selection in ARMA models, how can I find this R module or the code ? 2- I wrote the algorithm and the code for the Levy driven CARMA and CO

[R] Whites test

2011-12-08 Thread RToss
Hi all! I am quite new to R, and therefore in the need for som help. I want to perform a Whites test for my OLS, how is this accomplished? Thanks a lot! /Richard -- View this message in context: http://r.789695.n4.nabble.com/Whites-test-tp4172741p4172741.html Sent from the R help mailing list

[R] rjags in a Windows 7 64 bits machine

2011-12-08 Thread Filipe Ferminiano Rodrigues
Hi. I was trying to follow this rjags tutorial (example 1): http://www.johnmyleswhite.com/notebook/2010/08/20/using-jags-in-r-with-the-rjags-package/comment-page-1/#comment-19468 But when I try to run the following line in R, R crushes and close. jags <- jags.model('example1.bug', data = list('x'

[R] Representation of scientific units

2011-12-08 Thread Stephen Eglen
Has anyone got a neat way in R to handle scientific units along with numeric vectors? e.g. in mathematica, there is a Units package to allow you to do the following: 85 Meter/Second * 10 Second answer: 850 Meter (taken from http://library.wolfram.com/howtos/units/) Thanks, Stephen ___

Re: [R] sum of deviations from the weighted mean

2011-12-08 Thread R. Michael Weylandt
R FAQ 7.31 I'd imagine. (Floating point arithmetic and limitations thereof) Michael On Dec 8, 2011, at 9:15 AM, andrija djurovic wrote: > Hi all. I tried to calculate sum of deviations from the weighted mean and i > didn't get what i expected - 0. Here is an example: > >> wt <- c(10,25,38,22,5

[R] sum of deviations from the weighted mean

2011-12-08 Thread andrija djurovic
Hi all. I tried to calculate sum of deviations from the weighted mean and i didn't get what i expected - 0. Here is an example: > wt <- c(10,25,38,22,5) > x <- 6:10 > wm <- weighted.mean(x,wt) > (x-wm)*wt [1] -18.70 -21.75 4.94 24.86 10.65 > sum((x-wm)*wt) [1] -1.24345e-14 With simple mean I

Re: [R] matching using "which"

2011-12-08 Thread andrija djurovic
Hi. Here is one approach: if (length(b)>0) data[,-b] else data Andrija On Thu, Dec 8, 2011 at 1:25 PM, Vikram Bahure wrote: > Dear R users, > > I have a very simple query. > > I am using the following command, which should give me row no. for the > matching colnames. It works well for matching

[R] matching using "which"

2011-12-08 Thread Vikram Bahure
Dear R users, I have a very simple query. I am using the following command, which should give me row no. for the matching colnames. It works well for matching the colnames but if there is no column matching it gives me outcome as integer(0) which I am not able to use in further calculation. It wo

Re: [R] partial duplicates of dataframe rows, indexing and removal

2011-12-08 Thread Jean V Adams
Try this: df[!duplicated(df[, 1:3]), ] Jean Dgnn wrote on 12/07/2011 08:24:01 PM: > Hello. I am trying to remove from my dataframe, those rows in which the first > 7 columns are duplicated even if subsequent columns make those rows unique. > > df<-data.frame(id=rep(c('amy','bob','joe') , e

Re: [R] Read Windows BMP format images

2011-12-08 Thread Dr Gregory Jefferis
Answering my own question in case it is of help to anyone else in future: On 6 Dec 2011, at 09:20, Dr Gregory Jefferis wrote: > Does anyone know of an R package that can read Windows BMP format images? > Many thanks, http://www.bioconductor.org/packages/release/bioc/html/EBImage.html https://g

Re: [R] How to scale arrows to approximately fill a plot region?

2011-12-08 Thread Jim Lemon
On 12/08/2011 04:52 AM, Michael Friendly wrote: In a variety of graphic applications, I plot some data, together with arrows representing variables or linear transformations of variables as vectors in the same space, as in a biplot. In my applications, the scale of the arrows is arbitrary -- all

Re: [R] Hinton Diagram for a matrix of weights

2011-12-08 Thread Jim Lemon
On 12/08/2011 03:45 AM, Xavier Fernández i Marín wrote: Hello, Although I have used a general search engine, r-seek, and browsed CRAN for contributed packages and R Gallery, I have not been able to find an implementation of Hinton Diagrams for representing weighting matrices using R. Does anyon

Re: [R] nice report generator?

2011-12-08 Thread Tal Galili
I think it would be *great *if an extension of Duncan's new "tables" package could include themes and switches as are seen in the video Gabor just linked to. Tal On Thu, Dec 8, 2011 at 6:58 AM, Gabor Grothendieck wrote: > On Wed, Dec 7, 2011 at 11:42 PM, Michael wrote: > > Do you have an exam

[R] span and epsilon in Cyclic loess

2011-12-08 Thread ali_protocol
Hi everyone, Is there any automated method to optimize span and epsilon in cyclic loess normalization? I'm using cyclic loess normalization for an array with <1000 genes. Thanks in advance. -- View this message in context: http://r.789695.n4.nabble.com/span-and-epsilon-in-Cyclic-loess-tp417191

Re: [R] reading partial data set

2011-12-08 Thread bcdc
Thank you! -- View this message in context: http://r.789695.n4.nabble.com/reading-partial-data-set-tp4169210p4171885.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinf

Re: [R] read.table performance

2011-12-08 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/12/11 09:32, Petr PIKAL wrote: > Hi > >> system.time(dat<-read.table("test2.txt")) > user system elapsed 32.380.00 32.40 > >> system.time(dat <- read.table('test2.txt', nrows=-1, sep='\t', > header=TRUE)) user system elapsed 32.300.

Re: [R] nice time series viewer?

2011-12-08 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/12/11 20:31, R. Michael Weylandt wrote: > plot.xts() > > chartSeries() if you are using financial data? > > It's going to depend on your (unstated) form of time series, but > generally R isn't set up for interactive graphics. (chartSeries > be

Re: [R] running texi2dvi without running bibtex

2011-12-08 Thread Aidan Corcoran
Hi Duncan, I think you're right. I should have read the texi2dvi help more carefully - it says Run latex and bibtex until all cross-references are resolved and create either a dvi or PDF file. there doesn't seem to be a way to not run bibtex. But as you suggested, all I have to do is system("pdf

[R] Create checkpoint - was: How to de-source and re-source a file?

2011-12-08 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/12/11 21:27, Roebuck,Paul L wrote: > So create a checkpoint... > > > -myfile.R- > > checkpoint.file <- "checkpoint_appname.RData" > if (!file.exists(checkpoint.file) { ## Do compute i

Re: [R] read.table performance

2011-12-08 Thread Petr PIKAL
Hi > system.time(dat<-read.table("test2.txt")) user system elapsed 32.380.00 32.40 > system.time(dat <- read.table('test2.txt', nrows=-1, sep='\t', header=TRUE)) user system elapsed 32.300.03 32.36 Couldn't.it be a Windows issue? _ platform i386

Re: [R] a weird "cut" question

2011-12-08 Thread Jeff Newmiller
You picked a data set and ask whether the function parameters can fix the partition. Perhaps you should consider a different data set: rep(47677,9). I think you cannot "fix" the partition without considering the data also. Given that, you may be able to go back and manually identify a partition

  1   2   >