[R] change location of temporary files

2018-02-23 Thread Kumar Mainali
to use the usual location for temp files in the internal HD. Thanks in advance, Kumar Mainali -- Postdoctoral Associate Department of Biology University of Maryland, College Park ᐧ [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] parallel computing with foreach()

2017-12-07 Thread Kumar Mainali
5, RAT = FALSE) > Error in data.frame(values = unlist(unname(x)), ind, stringsAsFactors = > FALSE) : > arguments imply differing number of rows: 25, 0 > > HTH, > > Peter > > On Wed, Dec 6, 2017 at 10:03 PM, Kumar Mainali <kpmain...@gmail.com> > wrote: &g

[R] parallel computing with foreach()

2017-12-06 Thread Kumar Mainali
I have used foreach() for parallel computing but in the current problem, it is not working. Given the volume and type of the data involved in the analysis, I will try to give below the complete code without reproducible example. In short, each R environment will draw a set of separate files,

[R] fraction of null deviance explained by each node/variable in regression trees

2017-10-05 Thread Kumar Mainali
at the root). In the subsequent splits, this formula is slightly different. There probably is a function to get this done within R. Any help is appreciated. Thank you, Kumar Mainali -- Postdoctoral Associate Department of Biology University of Maryland, College Park ᐧ [[alternative HTML

Re: [R] dissolve tiny polygons to others with unionSpatialPolygons{maptools}

2016-06-06 Thread Kumar Mainali
appreciated! ᐧ Postdoctoral Associate Department of Biology University of Maryland, College Park On Mon, Jun 6, 2016 at 9:24 AM, Roger Bivand <roger.biv...@nhh.no> wrote: > On Mon, 6 Jun 2016, Kumar Mainali wrote: > > I am trying to use unionSpatialPolygons() of maptools to e

[R] dissolve tiny polygons to others with unionSpatialPolygons{maptools}

2016-06-05 Thread Kumar Mainali
raster} (IDs <- p.ranges$style_id) library(maptools) unionSpatialPolygons(p.ranges, IDs = IDs, threshold = 1.5) ​-- Kumar Mainali Postdoctoral Associate Department of Biology University of Maryland, College Park ᐧ [[alternative HTML version deleted]] ___

Re: [R] Help with color.scale {plotrix}

2015-10-09 Thread Kumar Mainali
> > > > On Fri, Oct 9, 2015 at 5:49 PM, William Dunlap <wdun...@tibco.com> wrote: > > Try setting the na.color argument of color.scale to a color string, > > not NA. "#0000" (alpha = 0 is the key part) is transparent so it it > > might > > sui

Re: [R] Help with color.scale {plotrix}

2015-10-09 Thread Kumar Mainali
because of R's recycling) > the first color in the sequence is c(1, 0, 0) or red ##FF and the > second color is c(1, 1, 0) #00 or yellow. > > Sarah > > On Fri, Oct 9, 2015 at 11:16 AM, Kumar Mainali <kpmain...@gmail.com> > wrote: > > Hi Jim, > >

Re: [R] Help with color.scale {plotrix}

2015-10-09 Thread Kumar Mainali
uot;) OR > cs1=c(1,0),cs2=(c(1,1),cs3=0 > > Obviously the shades of colors that you want may differ from the above, so > you have to play with the values to get the ones you want. In many cases, > you will have to specify more than two numbers for the color specs to get >

[R] Help with color.scale {plotrix}

2015-10-08 Thread Kumar Mainali
to green and other ranges. Thanks, Kumar Mainali Postdoctoral Associate Department of Biology University of Maryland, College Park [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https

[R] Phi coefficient matrix (package psych)

2015-04-21 Thread Kumar Mainali
), 10, replace=TRUE) df - data.frame(x,y,z) cor(df) library(psych) phi(df)​ Thank you, Kumar Mainali Postdoctoral Associate Department of Biology University of Maryland ᐧ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Phi coefficient matrix (package psych)

2015-04-21 Thread Kumar Mainali
=xcol,ncol=xcol) for(i in 1:xcol) { for(j in 1:xcol) newx[i,j]-phi(table(x[,i],x[,j])) } rownames(newx)-colnames(newx)-colnames(x) return(newx) } phimat(df) Jim On Wed, Apr 22, 2015 at 6:34 AM, Kumar Mainali kpmain...@gmail.com wrote: I want to calculate phi coefficient

[R] Looking for an R package for Set Cover Problem

2015-01-24 Thread Kumar Mainali
number of sets: [image: \{\{1, 2, 3\}, \{4, 5\}\}]. Thank you, Kumar Mainali Postdoctoral Fellow Environmental Science Institute The University of Texas at Austin ᐧ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] mvpart question - how to calculate deviance explained by variables?

2014-04-24 Thread Kumar Mainali
variable in one split as below: the deviance explained by cond = *1 – (2857+491)/3905.98 = 0.1426* Thank you. - Kumar Mainali ᐧ [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

[R] mvpart - is there a convenient way to calculate deviance explained by variables?

2014-04-23 Thread Kumar Mainali
explained by all variables. I cannot seem to find it. The function printcp gives you a nice table with rel error which you can use to estimate R^2. But printcp gives output for variously sized trees, not for variables entered into the model. - Kumar Mainali the deviance explained by cond = *1 – (2857

[R] mvpart - easy way to calculate deviance explained by variables

2014-04-22 Thread Kumar Mainali
explained by all variables. I cannot seem to find it. The function printcp gives you a nice table with rel error which you can use to estimate R^2. But printcp gives output for variously sized trees, not for variables entered into the model. - Kumar Mainali the deviance explained by cond = *1 â

[R] lineplot.ci{sciplot}: Split x.factor label in two lines

2013-06-06 Thread Kumar Mainali
Some of the levels in my X factor has more than one word (e.g., North America) which I would like to split into two lines so that my plot does not get too wide. Any help is appreciated. lineplot.CI(x.factor = Continent, response = PCC.PrsPts, group = PointSource, data = master2, cex = 1.2, xlab

[R] X-axis in meandist {vegan}

2013-06-02 Thread Kumar Mainali
that delineate clusters. dataEnvDist - vegdist(dataEnv, method=bray) ## bray curtis dissimilarity meanDist - meandist(dataEnvDist, dataFact$Source_by_Type) plot(meanDist, ylab=Mean dissimilarity) Thanks in advance. Kumar Mainali -- Section of Integrative Biology University of Texas at Austin Austin

[R] NMDS in Vegan: problems in stressplot, best solution

2013-04-26 Thread Kumar Mainali
Hello, I can draw a basic stress plot for NMDS with the following code in package Vegan. stressplot(parth.mds, parth.dis) When I try to specify the line and point types, it gives me error message. stressplot(parth.mds, parth.dis, pch=1, p.col=gray, lwd=2, l.col=red) Error in plot.xy(xy, type,

Re: [R] file copy to password protected network drive

2013-02-15 Thread Kumar Mainali
#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --- Sent from my phone. Please excuse my brevity. Kumar Mainali kpmain...@gmail.com wrote: I am trying to copy files to a password

[R] file copy to password protected network drive

2013-02-14 Thread Kumar Mainali
I am trying to copy files to a password protected drive which is Ranch at TACC from another network drive. I am logged in to the source drive and can run R there. The following code does not even find the destination folder. file.copy(sourcedrive/file.tar,

[R] Programmatically give file name to a matrix

2013-01-30 Thread Kumar Mainali
I have a situation when I need to save matrix with file names that are programmatically created. for (i in levels(mergeTrn$Continent)) { matrix here # I want to save this matrix with a file name that carries i from for loop. The following does not work. paste(plotroc_GBM_Trn_, i,

Re: [R] Programmatically give file name to a matrix

2013-01-30 Thread Kumar Mainali
Thank you Pascal and Greg for the suggestion. That is exactly what I needed! - Kumar On Wed, Jan 30, 2013 at 2:14 AM, Pascal Oettli kri...@ymail.com wrote: Hello, ?assign assign(paste(plotroc_GBM_Trn_**, i, sep=), matrix(rnorm(100),10,10)) HTH, Pascal Le 30/01/2013 17:04, Kumar

[R] Legend based on levels of a variable

2012-04-06 Thread Kumar Mainali
I have a bivariate plot of axis2 against axis1 (data below). I would like to use different size, type and color for points in the plot for the point coming from different region. For some reasons, I cannot get it done. Below is my code. col - rep(c(blue, red, darkgreen), c(16, 16, 16)) ## Choose

Re: [R] Legend based on levels of a variable

2012-04-06 Thread Kumar Mainali
Thank you every body for your suggestion. It does help. On Fri, Apr 6, 2012 at 2:37 AM, windmagics_lsl shfu_...@163.com wrote: I think there may 3 legends should be added in your plot the argument col, pch and pt.cex should be in the same length with legend, but the objects col, pch and cex

[R] Selecting files with a particular string in filename

2012-04-02 Thread Kumar Mainali
I am trying to find an efficient way to select certain text files from a folder with thousands of text files. I used file.list function with a specific pattern to obtain 70 files for each of the i's in 1:100. Next, I need to select some files from this list of 70 files. The files to be selected do

[R] Selecting unique values

2011-07-25 Thread Kumar Mainali
Greetings I have a dataset with occurrence records of multiple species. I need to get rid of multiple listings of the same occurrence point for a species (as you see below in red and blue typeface). How do I create a dataset only with unique set of longitude and latitude for each species? Thanks

[R] Displaying ylab in mfrow

2011-01-16 Thread Kumar Mainali
Dear R users, I cannot display ylab with the following code while trying to stack 7 rows of 3 histograms each. Thanks in advance! par(mfrow=c(7,3)) par(mar=c(2,2,2,2)) par(oma=c(5,5,0,0)) with (newdata - subset(table, Month1 == 1), hist(newdata$CarapWid, breaks=5*(0:80), col=gray80, main=All