Re: [R] how to read a PSB file in R?

2025-05-27 Thread Ranjan Maitra via R-help
On Tue May20'25 12:15:41AM, Ranjan Maitra via R-help wrote: > From: Ranjan Maitra via R-help > Date: Tue, 20 May 2025 00:15:41 -0500 > To: r-help@r-project.org > Reply-To: Ranjan Maitra > Subject: Re: [R] how to read a PSB file in R? > > On Tue May20'25 05:56:59A

Re: [R] how to read a PSB file in R?

2025-05-26 Thread Ranjan Maitra via R-help
On Tue May20'25 12:15:41AM, Ranjan Maitra via R-help wrote: > From: Ranjan Maitra via R-help > Date: Tue, 20 May 2025 00:15:41 -0500 > To: r-help@r-project.org > Reply-To: Ranjan Maitra > Subject: Re: [R] how to read a PSB file in R? > > On Tue May20'25 05:56:59A

Re: [R] how to read a PSB file in R?

2025-05-19 Thread Ranjan Maitra via R-help
On Tue May20'25 05:56:59AM, Rui Barradas wrote: > From: Rui Barradas > Date: Tue, 20 May 2025 05:56:59 +0100 > To: Ranjan Maitra , r-help@r-project.org > Subject: Re: [R] how to read a PSB file in R? > > Às 03:17 de 20/05/2025, Ranjan Maitra via R-help escreveu: > >

[R] how to read a PSB file in R?

2025-05-19 Thread Ranjan Maitra via R-help
I have come across this file (warning, massive, 4.3 GB) https://esahubble.org/media/archives/images/original/heic1502a.psb and it appears to be a filetype I was not aware of previously. Is it possible to read the file in R using any tool? It is an image and I am looking for the RGB of the file

Re: [R] pairs plot

2025-02-07 Thread Ranjan Maitra via R-help
Bert, Thanks very much! Oops! I can not believe I completely missed this! Best wishes, Ranjan On Thu Feb06'25 08:15:45AM, Bert Gunter wrote: > From: Bert Gunter > Date: Thu, 6 Feb 2025 08:15:45 -0800 > To: Ranjan Maitra > Cc: R-Help > Subject: Re: [R] pairs plot

[R] pairs plot

2025-02-06 Thread Ranjan Maitra via R-help
According to the help for pairs, the diag.panel function is supposed to take a panel.hist as in: pairs(USJudgeRatings[1:5], panel = panel.smooth, cex = 1.5, pch = 24, bg = "light blue", horOdd=TRUE, diag.panel = panel.hist, cex.labels = 2, font.labels = 2) Error: object 'pa

Re: [R] factor analysis of dynamic structure (FADS) for a huge time-series data

2021-05-08 Thread Ranjan Maitra
I am an author of the paper behind the fad package. I suspect that the call is not correct. Actually, fad does not quite account for time series or other structured data and you have to enter it, as in all general EFA packages as a n x p matrix, with n the number of observations and p the number

[R] display math with subscripts from a sequence

2020-04-18 Thread Ranjan Maitra
Dear friends, I am trying to display a sequence of characters x_1, x_2, ... x_30 on a plot. I know that I can use expression to do this by expression("x"[1]), etc. But, how do I do this efficiently for an entire sequence without having to type the individual expressions one by one? Many thank

Re: [R] getting all circular arrangements without accounting for order

2018-03-30 Thread Ranjan Maitra
gt;k <- seq( 2L, n - 2L ) >for ( i in seq.int( nrow( ix ) ) ) { > result[ ( i - 1L ) * jxrows + jxoffsets, k ] <- > matrix( v[ -ix[ i, ] ][ jx ], nrow = jxrows ) >} >result[ , 1L ] <- rep( ix[ , 1L ], each = jxrows ) >result[ , n1 ] <- rep( ix[ , 2L ],

Re: [R] getting all circular arrangements without accounting for order

2018-03-30 Thread Ranjan Maitra
) > , ix[ i, 2 ] > ) > } > ) >cbind( do.call( rbind, x ), n ) > } > ### > > For more speed, perhaps use Rcpp with [1]? > > [1] http://howardhinnant.github.io/combi

Re: [R] getting all circular arrangements without accounting for order

2018-03-30 Thread Ranjan Maitra
gt; > For more speed, perhaps use Rcpp with [1]? > > [1] http://howardhinnant.github.io/combinations.html > > On Thu, 29 Mar 2018, Ranjan Maitra wrote: > > > Thanks! > > > > Yes, however, this seems a bit wasteful. Just wondering if there are > > other,

Re: [R] getting all circular arrangements without accounting for order

2018-03-29 Thread Ranjan Maitra
> > > > On Mar 29, 2018, at 9:48 PM, Ranjan Maitra wrote: > > > > Dear friends, > > > > I would like to get all possible arrangements of n objects listed 1:n on a > > circle. > > > > Now this is easy to do in R. Keep the last spot fixed a

[R] getting all circular arrangements without accounting for order

2018-03-29 Thread Ranjan Maitra
Dear friends, I would like to get all possible arrangements of n objects listed 1:n on a circle. Now this is easy to do in R. Keep the last spot fixed at n and fill in the rest using permuations(n-1, n-1) from the gtools package. However, what if clockwise or counterclockwise arrangements are

Re: [R] reading lisp file in R

2018-01-20 Thread Ranjan Maitra
Thank you for your example. I have successfully modified it with regard to most fields. However, I think that am not going to be putting this out for my students. The class I am currently teaching is in multivariate statistics (both methods and applications, with R used for computing) and I use

Re: [R] reading lisp file in R

2018-01-17 Thread Ranjan Maitra
andard unix tool), creating an awk script to process the > file > into a new file with one line for each record, each line with 18 fields, > say comma-separated. > The csv file can then be easily read into R via the function read.csv. > > HTH, > Eric > > > On Thu, Ja

Re: [R] reading lisp file in R

2018-01-17 Thread Ranjan Maitra
Many thanks for your response! Best wishes, Ranjan On Wed, 17 Jan 2018 20:59:48 -0800 David Winsemius wrote: > > > On Jan 17, 2018, at 8:22 PM, Ranjan Maitra wrote: > > > > Dear friends, > > > > Is there a way to read data files written in lisp into R?

[R] reading lisp file in R

2018-01-17 Thread Ranjan Maitra
Dear friends, Is there a way to read data files written in lisp into R? Here is the file: https://archive.ics.uci.edu/ml/machine-learning-databases/university/university.data I would like to read it into R. Any suggestions? Thanks very much in advance for pointers on this and best wishes, Ra

Re: [R] example of geom_contour() with function argument

2017-10-10 Thread Ranjan Maitra
unction is and then determine how to > >> do a > >> 2d estimate on the original data. I'm guessing this is homework so not > >> inclined to offer a complete solution. > >> > >> -- > >> David. > >> > >> > >> > > >> > Can you please tell me how to use this here? Or is some other example > >

Re: [R] how to overlay 2d pdf atop scatter plot using ggplot2

2017-10-08 Thread Ranjan Maitra
Hi, I am no expert on ggplot2 and I do not know the answer to your question. I looked around a bit but could not find an answer right away. But one possibility could be, if a direct approach is not possible, to draw ellipses corresponding to the confidence regions of the multivariate t density

Re: [R] multi variable analysis

2017-10-08 Thread Ranjan Maitra
Arun, I would suggest either getting enrolled in a multivariate statistics class and the pre-requisites for this or going back to your boss and asking him or her to hire a MS-level statistician since this is clearly beyond your current state of knowledge. Don't expect R-help to be a free cons

Re: [R] Manipulations with CO2 dataset on R

2017-10-08 Thread Ranjan Maitra
Hello Ludovico, What is your goal in taking this class? If you are expecting someone else to do your homework for you, you should really consider whether you should waste your time and your funding source's money to take this class. In any case, HW questions are off-topic for this list. So, R

Re: [R] Fwd: Find maxima of a function

2017-08-27 Thread Ranjan Maitra
I have not followed the history of this thread, but I am quite flummoxed as to why the OP is rewriting code to estimate parameters from an univariate Gaussian mixture model when alternatives such as EMCluster (which generally appears to handle initialization better than MClust) exist. Or perhaps

Re: [R] Scaling Matrix in qda() function in MASS package

2017-08-24 Thread Ranjan Maitra
I guess the question that is being asked here is what is the scaling matrix that is being returned in the qda object. The help file on qda() says: ... scaling: for each group ‘i’, ‘scaling[,,i]’ is an array which transforms observations so that within-groups covariance matrix is spherical. ... T

Re: [R] package to fit mixtures of student-t distributions

2017-06-29 Thread Ranjan Maitra
Would package "teigen" help? Ranjan On Thu, 29 Jun 2017 14:41:34 +0200 vare vare via R-help wrote: > Hello! > > I am new to R (before used python exclusively and would actually call the R > solution for this issue inside a python notebook, hope that doesn’t > disqualify me right of the batc

Re: [R] display double dot over character in plotmath?

2017-05-14 Thread Ranjan Maitra
On Sun, 14 May 2017 09:08:46 -0700 David Winsemius wrote: > > > On May 14, 2017, at 8:43 AM, Ranjan Maitra wrote: > > > > Thanks, Duncan! > > > > This works for the particular case and is, to my mind, a great solution! > > > > However, I was

Re: [R] display double dot over character in plotmath?

2017-05-14 Thread Ranjan Maitra
of Agronomy and Soil Science > University of New England > Armidale NSW 2351 > Email: home: mac...@northnet.com.au > > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Ranjan > Maitra > Sent: Saturday, 13 May 2017 22:48 >

Re: [R] display double dot over character in plotmath?

2017-05-13 Thread Ranjan Maitra
On Sat, 13 May 2017 20:25:41 +0200 Berend Hasselman wrote: > > > On 13 May 2017, at 20:10, David Winsemius wrote: > > > >> > >> On May 13, 2017, at 5:47 AM, Ranjan Maitra wrote: > >> > >> On Fri, 12 May 2017 23:39:14 -0700 Daniel No

Re: [R] display double dot over character in plotmath?

2017-05-13 Thread Ranjan Maitra
On Fri, 12 May 2017 23:39:14 -0700 Daniel Nordlund wrote: > On 5/12/17 4:55 PM, Ranjan Maitra wrote: > > Hi, > > > > Is it possible to display double dot (umlaut) over a character such as > > would be possible using \ddot x in LaTeX? I can do this using tikzDevice

[R] display double dot over character in plotmath?

2017-05-12 Thread Ranjan Maitra
Hi, Is it possible to display double dot (umlaut) over a character such as would be possible using \ddot x in LaTeX? I can do this using tikzDevice but I wanted something simpler to point to. Here is an example of what I would like to do, but it is not quite there: require(ggplot2) data<-as.d

Re: [R] taking a small piece of large tiff

2017-04-06 Thread Ranjan Maitra
Hello Louisa, THis is not a R solution but would it not be easier to use ImageMagick to do what you are wanting to do? Look up https://www.imagemagick.org/script/index.php HTH, Ranjan On Wed, 5 Apr 2017 08:23:51 +0100 Louisa Reynolds via R-help wrote: > Ok. I have a tiff of size over 2GB. It

Re: [R] Clustering methods for data that has bimodal distribution

2016-12-05 Thread Ranjan Maitra
Hello Adrian, It all depends on what the structure of the dataset is. For instance, you said that all your values are betweenn -1 and 1. Do the data rown sum-squared up to 1? How about the means? Are they zero. I guess all this has to depend on the application and how the data were processed or

Re: [R] Improving performance by rewriting for loops into apply functions

2016-07-23 Thread Ranjan Maitra
Hi, The apply here does exactly what you would expect. (Your problem seems to be with the function that you have written. For some reason, you want to change the values of path2 but are passing it as a variable o a function. The global value of path2 will not change.) For that, you have to also

Re: [R] Non Linear Solver - Optim in R

2016-06-17 Thread Ranjan Maitra
You need to send e-mail from a properly identifiable address (which has a correct name/e-mail address) and not a made-up scam address. You can easily be reported for impersonation! Ranjan On Fri, 17 Jun 2016 08:51:59 -0500 Narendra Modi wrote: > Hello, > Resending this message in "Plain-text

Re: [R] R for RedHat Linux upgrade?

2016-05-17 Thread Ranjan Maitra
If I am not mistaken, R is not available from the RH repo. It is available from Fedora's EPEL repo for RH, CentOS and the like. I use Fedora and I have noticed that 3.3 is in testing repo there. You may want to install it and provide feedback on bodhi if you want a faster move to EPEL (and Fedor

Re: [R] selection columns by type, ie, numeric

2016-04-30 Thread Ranjan Maitra
It would have been more useful to the list and to posterity if you had summarized whatever it was that worked or solved your problem. This note is not very meaningful otherwise. On Sat, 30 Apr 2016 16:00:10 + (UTC) Carl Sutton via R-help wrote: > My  thanks to Bill Dunlap and  Giorgio Gar

Re: [R] K mean clustering with extra constraints

2016-03-24 Thread Ranjan Maitra
Hannah, Let me see if I can understand your question. You have 10 observations of a single variable (perhaps some sort of price?). You also have an equivalence matrix between these observations (which you possibly called nodes) which stipulates if they are connected together or not. Given tha

Re: [R] normalmixEM gives widely divergent results.

2016-01-27 Thread Ranjan Maitra
On Wed, 27 Jan 2016 11:51:07 -0500 John Sorkin wrote: > I am running normalmixEM: > mixmdlscaled <- normalmixEM(data$FCWg) > summary(mixmdlscaled) > plot(mixmdlscaled,which=2) > > If I run the program multiple times, I get widely different results: > > > mixmdlscaled <- normalmixEM(data$FCW

Re: [R] installing tikzDevice for R 3.2.3

2016-01-16 Thread Ranjan Maitra
On Sat, 16 Jan 2016 04:45:58 + Ben Bolker wrote: > Ranjan Maitra inbox.com> writes: > > > > > On Fri, 15 Jan 2016 21:25:06 -0600 Ranjan Maitra > inbox.com> wrote: > > > > > Hi, > > > > > > I wanted to install tikzDevices on a

Re: [R] installing tikzDevice for R 3.2.3

2016-01-15 Thread Ranjan Maitra
m";) > # make sure your version of R supports https > > Regards, > Yihui > -- > Yihui Xie > Web: http://yihui.name > > > On Fri, Jan 15, 2016 at 9:37 PM, Ranjan Maitra > wrote: > > On Fri, 15 Jan 2016 21:25:06 -0600 Ranjan Maitra > > wrote: &g

Re: [R] installing tikzDevices for R 3.2.3

2016-01-15 Thread Ranjan Maitra
On Fri, 15 Jan 2016 21:25:06 -0600 Ranjan Maitra wrote: > Hi, > > I wanted to install tikzDevices on a installation of R (3.2.3) on a new > machine. However, I am getting: > > > install.packages('tikzDevices') > > Warning message: > package ‘tikz

[R] installing tikzDevices for R 3.2.3

2016-01-15 Thread Ranjan Maitra
Hi, I wanted to install tikzDevices on a installation of R (3.2.3) on a new machine. However, I am getting: > install.packages('tikzDevices') Warning message: package ‘tikzDevices’ is not available (for R version 3.2.3) Is there any way out for me other than wait for the tikzDevices to be upd

Re: [R] plotmath not available on R 3.2.2

2015-12-12 Thread Ranjan Maitra
> > > > Yes, that is what I thought so too earlier (and indeed is still true, sorry > > about that). The whole issue started at my end because I misremembered > > about plotmath which is neither a function nor a package. > > > >> Perhaps install.packages() should give a different error message wh

Re: [R] plotmath not available on R 3.2.2

2015-12-12 Thread Ranjan Maitra
> A couple of things: > > First, there is a SIG list specifically for R on Fedora and RHEL > distributions and their derivatives: > > https://stat.ethz.ch/mailman/listinfo/r-sig-fedora > > Second, how did you install R? If you used the precompiled binary RPMS for > Fedora that are available

Re: [R] plotmath not available on R 3.2.2

2015-12-12 Thread Ranjan Maitra
On Sat, 12 Dec 2015 10:51:16 -0600 Marc Schwartz wrote: > > > On Dec 12, 2015, at 10:47 AM, Ranjan Maitra > > wrote: > > > > Hi, > > > > I recently needed to install a fresh OS (Fedora 23, where R 3.2.2 is the > > latest), and which meant every

[R] plotmath not available on R 3.2.2

2015-12-12 Thread Ranjan Maitra
Hi, I recently needed to install a fresh OS (Fedora 23, where R 3.2.2 is the latest), and which meant everything has to be installed from scratch. In so doing, I got the somewhat familiar: >install.packages('plotmath') Installing package into ‘/usr/lib64/R/library’ (as ‘lib’ is unspecified) War

Re: [R] TSclust multivariate time series clustering

2015-08-27 Thread Ranjan Maitra
Hello, Although there is no R package available (we did not think of it), if you want a Gaussian-mixture=model-based approach, you may look at the paper: "Model-Based Clustering of Regression Time Series Data via APECM—An AECM Algorithm Sung to an Even Faster Beat" by Wei-Chen Chen

Re: [R] Corrected: approaches to matrix multiplication of each layer of 3-d array with different matrix

2015-07-10 Thread Ranjan Maitra
--- > Sent from my phone. Please excuse my brevity. > > On July 10, 2015 6:44:19 AM PDT, Ranjan Maitra > wrote: > >Hi, > > > >Sorry to post again, but there is a careless error in my first R code > >snippet: > > > >--- begin R code ---

[R] Corrected: approaches tpmatrix multiplication of each layer of 3-d array with different matrix

2015-07-10 Thread Ranjan Maitra
(X = AB, MARGIN = 3, FUN = (function(mat) ((mat[1:dA, ] %*% mat[(dA+1):(dim(AB)[1]),], dim = dim(A)) } system.time(arraymatrixproduct(AA, BB)) --- end R code --- However, the second is almost twice as long as the first snippet. Many thanks, Ranjan On Fri, 10 Jul 2015 08:23:49 -0500 Ranjan

[R] approaches tpmatrix multiplication of each layer of 3-d array with different matrix

2015-07-10 Thread Ranjan Maitra
Dear friends, I have two 3-d arrays of appropriate dimensions. I want to postmultiply the 2-D matrix layers of the first with the 2-D matrix layers of the second. Can I do this easily in R avoiding loops? As an example: --- begin R code --- AA <- array(1:60, dim = c(5500,44,33)) BB <- array(1

Re: [R] Installing R 2.15.2 on Mac

2015-06-12 Thread Ranjan Maitra
Nicki, I don't know if you will be doing any clustering using kmeans in R, but there was a bug in 2.15.2 and 2.15.3 IIRC. This was fixed in 3.0. Btw, are there any capabilities of SPSS that you need and that R can't provide? Best wishes, Ranjan On Fri, 12 Jun 2015 13:37:27 -0400 Nicole Yarkov

[R] R code/package for calculation of Wasserstein distance between two densities

2015-04-20 Thread Ranjan Maitra
Dear friends, Before reinventing the wheel, I was wondering if anyone can point me to code for calculating the Wasserstein distance between two densities. I am particularly interested in mixture densities (in functional form). I know that we have the earthmovers distance in R via the emdist pa

Re: [R] Parallel processing in Matlab (irrelevant to R)

2015-04-11 Thread Ranjan Maitra
Sorry, I think you posted to the wrong group. Ranjan On Sat, 11 Apr 2015 19:01:04 +0200 John Wasige wrote: > Dear community, > > Sory for cross posting. Does anybody have an idea on how I can do parallel > in MATLAB? > > thanks for your help > > -- > John Wasige > > [[alternative H

Re: [R] Ranjan Maitra's comment "Re: Variance is different in R vs. Excel?

2015-02-10 Thread Ranjan Maitra
Wyllys > > > On 02/10/2015 05:00 AM, r-help-requ...@r-project.org wrote: > > ate: Mon, 9 Feb 2015 17:39:14 -0600 > > From: Ranjan Maitra > > To: > > Subject: Re: [R] Variance is different in R vs. Excel? > > Message-ID:<20150209173914.bae4d99ebeadafed35

Re: [R] Variance is different in R vs. Excel?

2015-02-09 Thread Ranjan Maitra
I suspect that this is the long-documented issue with indeed an entire industry -- and publications -- devoted to finding such errors in Excel. Till the 2013 version, it used to be a favorite HW problem of mine. Basically, Excel uses the "short formula" to calculate the variance and the sd. This

Re: [R] Deducer future?

2014-12-05 Thread Ranjan Maitra
Btw, I did hear back immediately from Ian Fellows and it is being maintained as his time permits, though he himself is not a windows user, and possibly therefore the issues. I thanked him for his e-mail and was relieved to note that this is not going away yet. Thanks again to Duncan, Sarah and

Re: [R] Deducer future?

2014-12-05 Thread Ranjan Maitra
On Fri, 5 Dec 2014 15:27:10 -0500 Duncan Murdoch wrote: > On 05/12/2014 3:11 PM, Ranjan Maitra wrote: > > On Fri, 5 Dec 2014 12:54:17 -0500 Duncan Murdoch > > wrote: > > > > > On 05/12/2014 12:34 PM, Ranjan Maitra wrote: > > > > Hi, > > > &g

Re: [R] Deducer future?

2014-12-05 Thread Ranjan Maitra
On Fri, 5 Dec 2014 12:54:17 -0500 Duncan Murdoch wrote: > On 05/12/2014 12:34 PM, Ranjan Maitra wrote: > > Hi, > > > > I have been using Deducer for the past year for my very basic 100-level > > introductory statistics classes for students from other disciplines. I

[R] Deducer future?

2014-12-05 Thread Ranjan Maitra
Hi, I have been using Deducer for the past year for my very basic 100-level introductory statistics classes for students from other disciplines. I really have liked using it for this specific purpose (takes me out of JMP!). However, over the past few months, issues have started cropping up with

Re: [R] please please unsubscribe!!!!!!!!!!!!!!!!

2014-12-01 Thread Ranjan Maitra
> Sent from my phone. Please excuse my brevity. > > On December 1, 2014 6:15:47 AM PST, Martin Maechler > wrote: > >Thank you for all the thoughts about alleviating these problems, > >both to us and the "newbies" (or otherwise e-mail clueless &g

Re: [R] please please unsubscribe!!!!!!!!!!!!!!!!

2014-11-30 Thread Ranjan Maitra
Following on Rich and Peter, is it practical for the list to put it at the top then, before the R-message? Something like: TO UNSUBSCRIBE from the list: see https://stat.ethz.ch/mailman/listinfo/r-help And then continue on for each R message. Because top-posting has pretty much taken over, the

Re: [R] please please unsubscribe!!!!!!!!!!!!!!!!

2014-11-30 Thread Ranjan Maitra
I agree with this sentiment and suggestion. I can not see much of a downside to it, with the exception that most of these "unsophisticated" users will probably not even bother reading it. But then we would all be back in the current situation, not worse. Ranjan On Sat, 29 Nov 2014 21:58:23 -05

Re: [R] Generate random numbers under constrain

2014-11-22 Thread Ranjan Maitra
I don't understand this discussion at all. n random numbers constrained to have sum <=1 are still random. They are not all independent. That said, the original poster's question is ill=formed since there can be multiple distributions these random numbers come from. best wishes, Ranjan On Sa

Re: [R] mclust for time series

2014-11-03 Thread Ranjan Maitra
On Mon, 3 Nov 2014 13:51:52 +0100 atesh koul wrote: > Hi all, > > I am new to using model based clustering. I am using the clustering to find > how many clusters could be there in the data and the assignment of trials > to these clusters. > > The data are hand kinematics data- 12 variables at 1

Re: [R] Gaussian mixture model based clustering

2014-10-09 Thread Ranjan Maitra
There are lots! eg: Mclust or EMCluster and many more. Ranjan On Thu, 9 Oct 2014 10:37:45 +0200 Alexandra Posekany wrote: > Hey everybody, > I am looking for a R implementation of uni- and multivariate GMM clustering > which is both fast and can provide me with estimates of the respective > co

Re: [R] Masked from package

2014-09-24 Thread Ranjan Maitra
Hi Rich, I believe it means that when called, the function norm() in the 'base' and the function cor () in the 'NADA' packages are not going to be used, but rather functions of the same name (norm and cor) in the package that you loaded with your library () function. Same applies to other objects

Re: [R] Where to find source of C_pbinom?

2014-08-27 Thread Ranjan Maitra
Hi, I have not followed the e-mail trail, but if you are looking for the C source code for pbinom, then it is pbinom.c in src/nmath. HTH, Ranjan On Wed, 27 Aug 2014 08:34:11 -0400 Marius Hofert wrote: > Dear Sarah, Dear David, > > thanks for helping. I know the FAQ and I know the R News arti

Re: [R] R GUI for undergraduate lab class?

2014-07-12 Thread Ranjan Maitra
Hi Louise, I tried using Deducer (graphical frontend to R) in my introductory class (Stat 105 at Iowa State University) for civil and construction engineers and this was a roaring success this year. The class itself has a wee bit of software experience, which has previously been done using JMP. M

Re: [R] seeking latex peace

2014-05-27 Thread Ranjan Maitra
On Tue, 27 May 2014 14:01:56 +1000 Jim Lemon wrote: > On Mon, 26 May 2014 09:43:45 AM Ranjan Maitra wrote: > > ... > > Though, I have to say I don't quite see how you managed to install R > > without the above package (it is a required dependency on Fedora). > &

Re: [R] seeking latex peace

2014-05-26 Thread Ranjan Maitra
Hi, > As I could not find any way to install pdflatex (it didn't appear on a yum > search), I tried a method that claimed to install pdflatex via a package Trying yum provides */pdflatex will yield the package name: texlive-latex-bin-bin. Though, I have to say I don't quite see how you ma

Re: [R] Using apply with more than one matrix

2014-04-30 Thread Ranjan Maitra
Hi Scott, You could set up a three-dimensional array and then use apply on the desired dimension (MARGIN in apply language). HTH! Many thanks, Ranjan On Wed, 30 Apr 2014 17:54:48 + "Waichler, Scott R" wrote: > Hi, > > I want to apply a custom function to all the elements of one matrix.

Re: [R] Fwd: problem with kmeans

2014-04-28 Thread Ranjan Maitra
Cassie, I am sorry but do you even know what k-means does? That it is a locally optimal algorithm. That different software implement the same algorithm differently. FYI, R uses the Hartigan-Wong (1979) algorithm by default, which is probably the most efficient out there. I suggest you first go

Re: [R] kmeans function

2014-03-26 Thread Ranjan Maitra
On Wed, 26 Mar 2014 18:35:34 + "Tomassini, Letizia" wrote: > > Hello > I need to ask questions about the k-means clustering function. Mainly I would > like to know why, with the use of nstart=enough number of times, kmeans > always finds the same clustering arrangements; and this happens e

Re: [R] ggplot2: how to increase size of legend box when converting to pdf

2014-03-03 Thread Ranjan Maitra
On Mon, 3 Mar 2014 16:17:11 -0500 Duncan Murdoch wrote: > On 14-03-03 4:02 PM, Ranjan Maitra wrote: > > Hi, > > > > I have struggled with this quite a bit (all morning and afternoon) and I > > am not sure I am any close to a solution. Basically, here is my sample >

[R] ggplot2: how to increase size of legend box when converting to pdf

2014-03-03 Thread Ranjan Maitra
Hi, I have struggled with this quite a bit (all morning and afternoon) and I am not sure I am any close to a solution. Basically, here is my sample code: require(grid) require(ggplot2) X <- data.frame(x = c(rnorm(10), rnorm(10, mean = 2, sd = 2), rnorm(10, mean =5)), group = c(rep("Ellipse", 10)

Re: [R] equivalent of $\check Y$ in plotmath

2014-02-23 Thread Ranjan Maitra
-graphics/ > Here is an example: > > library(tikzDevice) > tikz('test-math.tex', standAlone = TRUE) > plot(1, main = '$\\check{Y}$') > dev.off() > system('pdflatex test-math.tex') > > > Regards, > Yihui > -- > Yihui Xie &

[R] equivalent of $\check Y$ in plotmath

2014-02-22 Thread Ranjan Maitra
Hi, I am trying to put the expression which in LaTeX would be $\check Y$ as a label on the axis of a plot. How does one get the \check part of the above to produce a similar symbol in plotmath in R? I looked around plotmath's help but could not see this in the documentation. Many thanks for any

[R] demonstrating R in introductory class using point-and-click software

2014-01-15 Thread Ranjan Maitra
Dear friends, OK, I did not think that it would ever come down to this, but I am here with a question on what would be the best point-and-click approach to using R in the classroom in a way that the students can also follow and exhibit (on their own). So let me explain: I am teaching an introduc

Re: [R] Any way to pre-set the number of observations for each cluster with kmeans?

2013-12-29 Thread Ranjan Maitra
Hello Taak, I don't believe that this can be done. What you are asking for is essentially a constrained k-means algorithm with the constraint that regardless of the consequences (higher within sum or squares), you restrict each of the K groups to have at least N observations: within this constrain

Re: [R] Analysis

2013-11-13 Thread Ranjan Maitra
Don't know if the data will support the result that you want but the only way to get some sort of answer is to hire a statistician. ranjan On Wed, 13 Nov 2013 20:58:30 -0400 Jim Silverton wrote: > Hi, > > > > I have 187 urine cultures which were subjected to culture and microscopy > methods.

Re: [R] Hierarchical Cluster Analysis with large dataset

2013-11-03 Thread Ranjan Maitra
On Sun, 3 Nov 2013 10:42:06 +0100 Petar Milin wrote: > Hello! > Can anyone give me advice on running Hierarchical Cluster Analysis on large > datasets? For example, 8x1. Calculating distances on such a > dataframe seems impossible even on very powerful computer. > > Also, any other advic

Re: [R] saving as TIFF - problem with compression

2013-09-20 Thread Ranjan Maitra
Hi, Are you using Linux? If so, you may use ImageMagick and try your luck using convert filename.whatever.format filename.tiff There are lots of options in ImageMagick. (Read the manual.) I have done this in the past, and it has worked. However, your exact situation may be different, so sorry

Re: [R] Installing R on Fedora 18 Linux?

2013-07-06 Thread Ranjan Maitra
Fedora does have the latest (both Fedora 18/19) R in the repos. (They are pretty good about this). To install R, try: sudo yum install R-core That will do it. To update, rather than install: try sudo yum update R-core HTH, Ranjan On Sat, 6 Jul 2013 20:22:13 -0700 Peter Langfelder wrote:

Re: [R] 3.0.1 update and compiler package

2013-06-04 Thread Ranjan Maitra
Hi, Did you try: update.packages(installed.packages()[,1]) or install.packages(installed.packages()[,1]) This will reinstall the packages you have on your system and for which updates for 3.0.1 exist. In my experience, as recounted here earlier, update.packages() does not always work: it bre

Re: [R] how to install R 3.0.1

2013-06-01 Thread Ranjan Maitra
On Sat, 1 Jun 2013 16:51:19 +0200 Uwe Ligges wrote: > > > On 01.06.2013 15:58, Ranjan Maitra wrote: > > On Sat, 1 Jun 2013 14:58:22 +0200 Uwe Ligges > > wrote: > > > >> > >> > >> On 01.06.2013 02:02, Ranjan Maitra wrote: >

Re: [R] how to install R 3.0.1

2013-06-01 Thread Ranjan Maitra
On Sat, 1 Jun 2013 14:58:22 +0200 Uwe Ligges wrote: > > > On 01.06.2013 02:02, Ranjan Maitra wrote: > > On Fri, 31 May 2013 18:10:19 -0500 Robert Baer wrote: > > > >> On 5/31/2013 11:59 AM, Ranjan Maitra wrote: > >>> Hi John, > >>> > &

Re: [R] how to install R 3.0.1

2013-05-31 Thread Ranjan Maitra
On Fri, 31 May 2013 18:10:19 -0500 Robert Baer wrote: > On 5/31/2013 11:59 AM, Ranjan Maitra wrote: > > Hi John, > > > > I suspect you may be missing a c()? > > > > On Fri, 31 May 2013 06:05:45 -0800 John Kane > > wrote: > > > >>

Re: [R] how to install R 3.0.1

2013-05-31 Thread Ranjan Maitra
Hi John, I suspect you may be missing a c()? On Fri, 31 May 2013 06:05:45 -0800 John Kane wrote: > paks <- install.packages( "Hmisc", "plyr") paks <- install.packages( c("Hmisc", "plyr")) > install.packages(paks) > You can use the command library() to get a list of what is installe

Re: [R] Empty clusters in k-means - possible solution

2013-05-19 Thread Ranjan Maitra
There is a documented bug in R 2.15.2 and R 2.15.3. The developers decided not to fix this with an update, but it has been fixed with R 3.0.0 (perhaps also with R 3.0.1, which I have not tried myself). So, upgrading R should take care of this problem. HTH, Ranjan On Sun, 19 May 2013 16:17:30 +020

Re: [R] Tiff plot Resolution issues

2013-05-01 Thread Ranjan Maitra
Actually, quite a few journals do ask for .tiff (or, often, also .eps) only (as part of their webpage instructions) but my experience has been that many take .pdf without a lot of fuss. The OP could try and see if pdf will fly. If not, then (s)he can go for TIFF images. If this is at the journal

Re: [R] Multiple Multivariate regression in R with 50 independent variables

2013-04-19 Thread Ranjan Maitra
First, do you know what a multivariate multiple (linear) regression means? As opposed to (univariate) multiple (linear) regression. As others have pointed out, the example referred to is of univariate multiple linear regression. Second, and more importantly, have you yourself tried doing the need

Re: [R] order statistic of multivariate normal

2013-03-22 Thread Ranjan Maitra
On Fri, 22 Mar 2013 09:31:53 -0700 Bert Gunter wrote: > Well... > > On Fri, Mar 22, 2013 at 8:20 AM, Ranjan Maitra < > maitra.mbox.igno...@inbox.com> wrote: > > > I don't believe that you necessarily need to use simulation for this. > > But you do need num

Re: [R] order statistic of multivariate normal

2013-03-22 Thread Ranjan Maitra
I don't believe that you necessarily need to use simulation for this. But you do need numerical integration. Here is a skeletal approach. Calculate the density (distribution) of the order statistics of a multivariate sample. Then since the underlying distribution is multivariate normal, use a mult

[R] fastICA package: C, R codes provide vastly different results

2013-01-17 Thread Ranjan Maitra
Dear friends, I have been trying out the C and the R codes in the fastICA package. However, it turns out that these often give vastly different results, especially when row.norm is set to T. This happens even though I have initialized the input matrix to be exactly the same for both of them. Here

[R] interpreting results of regression using ordinal predictors in R

2013-01-02 Thread Ranjan Maitra
Dear friends, Being very new to this, I was wondering if I could get some pointers and guidance to interpreting the results of performing a linear regression with ordinal predictors in R. Here is a simple, toy example: y <- c(-0.11, -0.49, -1.10, 0.08, 0.31, -1.21, -0.05, -0.40, -0.01,

Re: [R] efficiently multiply different matrices in 3-d array with different vectors?

2012-12-28 Thread Ranjan Maitra
[1]),function(i) Z[i,,]%*%Y[,i])) > # [,1] [,2]  [,3]  [,4]  [,5] > #[1,] 5065 6070 12328 11536 13678 > #[2,] 6152 9878 11161 13777  7991 Yes, this does it, many thanks! Ranjan > > > > > - Original Message - > From: Ranjan Maitra > To: r-help@r-p

[R] efficiently multiply different matrices in 3-d array with different vectors?

2012-12-27 Thread Ranjan Maitra
Hello, I have been wondering of an efficient way to do this: I have an n x m x p array Z and a p x n matrix Y. I want to multiply each of the n matrices with the corresponding column vector of Y. In other words, I am wanting to matrix multiply: Z[i, ,] %*% Y[, i] which will give me a (two-di

[R] lattice question: how to change the dot on boxplot to line

2012-12-10 Thread Ranjan Maitra
Hi, How does one change the dot for the median in a boxplot drawn using lattice? I have been looking at > names(trellis.par.get()) [1] "grid.pars" "fontsize" "background" [4] "panel.background" "clip" "add.line" [7] "add.text" "plot.polyg

[R] instrumental variables regression using ivreg (AER) or tsls (sem)

2012-11-29 Thread Ranjan Maitra
Dear friends, I am trying to understand and implement instrumental variables regression using R. I found a small (simple) example here which purportedly illustrates the mechanics (using 2-stage least-squares): http://www.r-bloggers.com/a-simple-instrumental-variables-problem/ Basically, here ar

Re: [R] kmeans cluster analysis. How do I (1) determine probability of cluster membership (2) determine cluster membership for a new subject

2012-10-02 Thread Ranjan Maitra
On Tue, 2 Oct 2012 14:32:12 -0400 John Sorkin wrote: > Ranjan, > Thank you for your help. What eludes me is how one computes the distance from > each cluster for each subject. For my first subject, datascaled[1,], I have > tried to use the following: > v1 <- sum(fit$centers[1,]*datascaled[1,])

Re: [R] kmeans cluster analysis. How do I (1) determine probability of cluster membership (2) determine cluster membership for a new subject

2012-10-02 Thread Ranjan Maitra
John, On Tue, 2 Oct 2012 11:35:12 -0400 John Sorkin wrote: > Window XP > R 2.15 > > I am running a cluster analysis in which I ask for three clusters (see code > below). The analysis nicely tells me what cluster each of the subjects in my > input dataset belongs to. I would like two pieces o

  1   2   >