Re: [R] Random Seed Location

2018-03-04 Thread Gary Black
Thank you, everybody, who replied! I appreciate your valuable advise! I will move the location of the set.seed() command to after all packages have been installed and loaded. Best regards, Gary Sent from my iPad > On Mar 4, 2018, at 12:18 PM, Paul Gilbert wrote: > > On Mon, Feb

[R] Random Seed Location

2018-02-26 Thread Gary Black
see the code, it is below: Thank you, Gary A. Separate the original (in-sample) data from the new (out-of-sample) data. Set a random seed. > InvestTech <- as.data.frame(InvestTechRevised) > outOfSample <- InvestTech[5001:nrow(InvestTech), ] > InvestTech <- InvestTech[1:

[R] Regression Tree Questions

2018-02-24 Thread Gary Black
picture of it in this email, but it displays the values of individual records at each node instead of the decision rule logic (e.g., Age >= 28). I'm using the command > fancyRpartPlot(model)

Re: [R] Gaussian Process Classification R packages

2017-12-11 Thread Gary Black
As a total novice and somebody lurking in the background who doesn't have a need to use R regularly except for a one-time project, I also am surprised by (really mainly one or two) people who answer most posts by telling people to do their homework, spend more time studying R, etc. Even novices kn

[R] Help with abs function

2015-06-12 Thread Nelson, Gary (MISC)
the absolute values of the negative differences are slightly greater than the difference of 0.1 Is this normal behavior for the abs() function? Thanks, Gary Nelson [[alternative HTML version deleted]] __ R-help@r-project.org mailing li

[R] Help with Programmin-1 submission.

2015-03-14 Thread Gary Baggett
> Any suggestions as to where to go? It appears to be unable to find my pollutantmean.R file even though I just sourced it. The function is in memory and is in the directory from which I am trying to execute the submit script. Thanks, Gary Baggett [[altern

Re: [R] factor() in lm

2013-12-01 Thread Gary Dong
Thanks, Bert. It seems I got these NAs because I already had MSA population controlled for in my model, besides the fixed effect variable, which led to overestimation. Those NAs disappeared after I dropped the population variable. Gary On Sun, Dec 1, 2013 at 10:27 AM, Bert Gunter wrote: >

[R] factor() in lm

2013-12-01 Thread Gary Dong
ode)47900 NA NA NA NA I wonder why I kep getting those "NAs". Thank you! Gary [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEAS

[R] summary many regressions

2013-11-25 Thread Gary Dong
e is a quicker way to do this. Use for loop? what I want to see is something like this: CityCoefficient Adjusted R square 1 -0.05 0.36 2 -0.12 0.20 3 -0.05 0.32 . Any advice is appreciated!

[R] if else in R

2013-11-19 Thread Gary Dong
ab$c<-0 } here is the error I got: Warning message: In if (ab$b > 0) { : the condition has length > 1 and only the first element will be used. Any help is appreciated! Gary [[alternative HTML version deleted]] __ R-hel

[R] plot time series data in wide format

2013-11-01 Thread Gary Dong
the five city is represented by a line in the plot. Any suggestion is appreciated! Thanks! Gary [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] extraction of roots in R

2013-11-01 Thread Gary Dong
represents the power. what is the easy way to do this? Thank you! Gary [[alternative HTML version deleted]] __ 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

[R] find max value in each row and return column number and column name

2013-11-01 Thread Gary Dong
2 y Any suggestion will be greatly appreciated! Thank you! Gary [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-proje

[R] Interpretation of coefficients in spatial lag models

2013-10-07 Thread Gary Dong
on Y: "The average total impact of a one-unit increase in X on Y is about 0.107. In other words, a one-unit increase in X is associated with a 0.107 unit increase in Y." Thanks! Gary [[alternative HTML version deleted]] __ R-help@r-proj

[R] Logged ratio as Dependent variable

2013-09-12 Thread Gary Dong
is the appropriate way to interpret model results. If yes, I also wonder how the distance coefficient should be interpreted if the distance variable takes natural log form in the regression. Thank you! Gary [[alternative HTML version deleted

Re: [R] Problems loading siar package

2013-07-24 Thread Gary Roemer
Hello, I had to load a different package separately. Did you try and find the 'hrdcde' package and load it independently? Best, Gary Roemer, Ph.D. Associate Professor Dept. Fish, Wildlife & Conservation Ecology New Mexico State University Las Cruces, NM 88003 Off: 575-646-3394 Fa

[R] Error in x[[1]] : subscript out of bounds

2013-05-31 Thread Gary Dong
Dear R users, I am estimating a nested logit model using "mlogit", but keep getting this error message: "Error in x[[1]] : subscript out of bounds" Anyone can tell me what this error means? Simple MNL model worked with the same data. Thank you! Gary [[alte

Re: [R] write table in ascii

2013-05-30 Thread Gary Dong
I am working in Windows system. But a software I am using requires data input in ascii (.dat, delimiters can be tabs or spaces). I was able to save the data into .dat (ascii) from SPSS, but it keeps causing problems. Thank you! Gary On Thu, May 30, 2013 at 3:51 PM, Sarah Goslee wrote: > On

[R] write table in ascii

2013-05-30 Thread Gary Dong
Dear R users, I have a data set in .csv and I hope to convert it to .dat (ascii) so it can work in an UNIX environment. Anyone can help me? Thank you! Gary [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

Re: [R] Mlogit error

2013-05-30 Thread Gary Dong
" and alt.var="" in the script, the model worked fined, with unbalanced choice set. Gary On Mon, Apr 8, 2013 at 1:13 AM, Leask, Graham wrote: > Dear Listmembers > > Thank you for your help in resolving the duplicate row.names error. The > solution was very straightforward

[R] "mlogit" does not report number of observation?

2013-05-30 Thread Gary Dong
Dear R users, I am wondering if there is an easy way to have "mlogit" to report number of observations (N) used in the model. It seems "summary()" does not work. Thank you! Gary [[alternative HTML version deleted]] __

[R] Installing gym package error

2013-04-10 Thread Gary
Dear R help Don't really understand if there is graph or should be graph. > library(ggm) Loading required package: graph Error: package ‘graph’ could not be loaded In addition: Warning messages: 1: package ‘ggm’ was built under R version 2.15.3 2: In library(pkg, character.only = TRUE, logica

[R] Internet connection

2013-04-05 Thread Gary
Tried several ways to connect to Internet. Perhaps R help could point me in the right direction to make this connection work. setInternet2(use = TRUE) > download.file(" + http://image.shutterstock.com/display_pic_with_logo/322090/322090,1307359665,10/stock-photo-car-silhouette-for-race-sports-d

[R] Warning: Spatial weights matrix not row standardized

2013-01-29 Thread Gary Dong
Hi, R users, I am doing Lagrange Multiplier Test Statistics for Spatial Autocorrelation with "spdep" and got this warning message: "Spatial weights matrix not row standardized". It is a warning, not an error. I am wondering if this is a problem. Thanks! Gary [[alte

[R] cannot print neighbor list object

2013-01-29 Thread Gary Dong
;col_wts" My question is: what is the right way to view the neighbor list? Thanks! Gary [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posti

[R] Multi lines in R plot

2012-09-19 Thread Gary Dong
o tell the differences between those dash lines. Thanks. Gary [[alternative HTML version deleted]] __ 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-

[R] Pseudo R squared in gls model

2012-08-23 Thread Gary Dong
Dear R users, I'm wondering if the gls function reports pseudo R. I do not see it by summary(). If the package does not report, can I calculate it in this way? Adjusted pseudo R squared = 1 - [(Loglik(beta) - k ) / Loglik(null)] where k is the number of IVs. Thanks! Gary [[altern

[R] negative AIC and BIC values in gls

2012-08-22 Thread Gary Dong
Dear R users, I obtained negative AIC and BIC and positive Loglik values in a gls model. Is this normal? how should I interpret them? Thanks! AIC BIC logLik -659.978 -587.5541 345.989 Best Gary [[alternative HTML version deleted

[R] spatial auto-correlation structure in nlme

2012-08-17 Thread Gary Dong
spatial correlation has been controlled for by the model, besides the improvements of AIC, BIC, and Loglik? 2) where can I find the formulas for the corExp or corGaus? Thanks! Gary [[alternative HTML version deleted]] __ R-help@r-project.org mai

[R] memory size

2012-07-21 Thread Gary Dong
X, P, SIMPLIFY = FALSE) : Reached total allocation of 16340Mb: see help(memory.size) I'm using win7 and my computer has 16G memory. Is there a way that I can make R use the memory more efficiently? Thanks! Gary [[alternative HTML version deleted]] __

[R] 3-d kernel smooth by the "kde" function

2012-07-18 Thread Gary Dong
te (or say smooth) elevation (z). Is this correct? With this kernel smooth, my goal is to identify peaks, which are defined as areas that have estimated elevations >=950. Can someone show me how to do this? Thanks! Best Gary [[alternative HTML version deleted]] ___

Re: [R] plotting points to a map

2012-07-18 Thread Gary Dong
lat, I mean distances to the city center from south-north and east-west directions. 2) I know the coordinate of the reference point. Thanks. Best Gary On Wed, Jul 18, 2012 at 11:30 AM, Sarah Goslee wrote: > Hi, > > On Wed, Jul 18, 2012 at 2:11 PM, Gary Dong wrote: > > Dear R u

[R] plotting points to a map

2012-07-18 Thread Gary Dong
. Gary [[alternative HTML version deleted]] __ 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

[R] Kernel smoothing ("ks" package)

2012-07-17 Thread Gary Dong
ng wrong with the kernel smooth, but could not figure out the right way to do it. Your help would be greatly appreciated! Thanks. Gary [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/list

Re: [R] identifying local maxima

2012-07-16 Thread Gary Dong
local maxima. Thanks. Gary On Thu, Jul 12, 2012 at 5:26 AM, Hans W Borchers wrote: > Gary Dong gmail.com> writes: > > > > Dear R users, > > > > I have created a Loess surface in R, in which x is relative longitude by > > miles, y is relative latitude by mi

[R] identifying local maxima

2012-07-11 Thread Gary Dong
rsp(seq(10, 300, 5), seq(10, 300, 5), emp.pred, phi = 45, theta = 45, xlab = "X Coordinate (feet)", ylab = "Y Coordinate (feet)", main = "Surface elevation data") With this, what's the right way to determine the coordinates of

[R] calculating inflection point in mixed effect model

2012-06-21 Thread Gary Dong
g how I can calculate the inflection point, at which the impacts of x on y turns positive into negative. Thanks! Gary [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] Multi-threads in R

2012-06-17 Thread Gary Dong
Thanks for all replied. I read the introduction of R parallel. Is it for loops only? Gary On Sun, Jun 17, 2012 at 10:04 AM, R. Michael Weylandt < michael.weyla...@gmail.com> wrote: > Take a look at the parallel package which ships with all current versions > of R. > > Mic

[R] Multi-threads in R

2012-06-17 Thread Gary Dong
Dear R users, I'm wonder if there is a easy way to make R use multi-CPUs on my computer. My computer has four CPUs but R uses only one. Thanks. Gary [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Specifying spatial correlation Form in nmle

2012-06-12 Thread Gary Dong
w what "east" and "north" are. Any help would be greatly appreciated. Best Gary [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the po

Re: [R] controlling spatial autocorrelation in linear regression models

2012-06-11 Thread Gary Dong
Thanks! This link is very helpful. Best Gary On Mon, Jun 11, 2012 at 4:28 AM, D.Soudis wrote: > > Hi, > > Maybe this is helpful..?? > > http://www.ats.ucla.edu/stat/r/faq/spatial_regression.htm > > Best, > Dimitrios > > -- > View this message in cont

[R] controlling spatial autocorrelation in linear regression models

2012-06-10 Thread Gary Dong
h other. I know multi-level regression can solve the problem partially by grouping parcels to a higher spatial level, such as block group or tract. However, the grouping could be very arbitrary. Is there a better way to do this? Thanks. Gary [[alternative HTML versi

[R] lmer function in R

2012-06-09 Thread Gary Dong
come (hinc) and IQ (IQ). At the school level, there is a dummy variable indicating if the school is a private school (prvsch). I also have school IDs (id) that can be used as the subject. I'm wondering what the syntax would be in R. Any advice is appreciated. Best Gary [[alternati

Re: [R] Two Y axes (same scale) in ggplot2 or plot

2012-05-09 Thread Gary Dong
Thanks, Duncan. I tried axis(). It appears it allows you to add an axis, but does not say you can plot a second Y in the graph. Maybe I'm understanding it correctly. Any help will be appreciated! Gary On Wed, May 9, 2012 at 7:26 AM, Duncan Murdoch wrote: > On 08/05/2012 3:23 PM, G

[R] Two Y axes (same scale) in ggplot2 or plot

2012-05-08 Thread Gary Dong
stand that multiple Y axes in different scales are not possible. I'm wondering if it is possible to have multiple Y axes with the same scale in ggplot2, like in my case. If still not possible, is there a easy way to do it in R's default plot function? Thanks. Gary [[alternati

[R] two Y Axes (in the same scale) in ggplot2

2012-05-08 Thread Gary Dong
stand that multiple Y axes in different scales are not possible. I'm wondering if it is possible to have multiple Y axes with the same scale in ggplot2, like in my case. If still not possible, is there a easy way to do it in R's default plot function? Thanks. Gary [[alternati

Re: [R] Problems loading siar package

2012-04-16 Thread Gary Roemer
Thanks Uwe, I'll give it a whirl. Best, Gary Gary Roemer Associate Professor Dept. Fish, Wildlife & Conservation Ecology New Mexico State University Las Cruces, NM 88003 Off: 575-646-3394 Fax:575-646-1281 groe...@nmsu.edu<mailto:groe...@nmsu.edu> http://web.nmsu.edu/~groemer/

Re: [R] Problems loading siar package

2012-04-15 Thread Gary Roemer
PS The version of "siar" on my old computer is 4.0, the new version is 4.1.3 - could the latter be corrupt? Thanks, Gary -- View this message in context: http://r.789695.n4.nabble.com/Problems-loading-siar-package-tp4560105p4560125.html Sent from the R help mailing list archive at

[R] Problems loading siar package

2012-04-15 Thread Gary Roemer
y problems loading "siar" on my old Macbook Pro and the library should be compatible with both operating systems: old = 10.5.8, new = 10.7.3. Thank you, Gary -- View this message in context: http://r.789695.n4.nabble.com/Problems-loading-siar-pac

[R] Webscraping - How to Scrape Out Text Into R As If Copied & Pasted From Webpage?

2011-10-26 Thread Moser, Gary
ar on the web site. I'd like to do a little text mining and make a wordcloud using the text. Can anybody suggest a method to achieve this result? Thank you, Gary R. Moser Institutional Research Analyst Heald College p <- 415.808.1533 f <- 415.808.1598 gary_mo...@heald.edu

[R] if else lop

2011-07-05 Thread gary engstrom
I am trying to use if...else loop and have included a code snippet which I might like to expand. Maybe you could steer me in the right direction. library(stats) library(prob) { a <- sample ( 1:4,100, replace=T,prob=c(0.1,0.2,0.5,0.3)) b<-sample(3:6,100,replace=T,prob=c(0.2,0.2,0.2,0

[R] if else loop

2011-07-05 Thread gary engstrom
Dear R help I was hoping you might be able to show me how to write a loop function take would ccomplish this task. library(prob) { a <- sample ( 1:20, 100, replace=T) b<-sample(5:24,100,replace=T) } dd <- data.frame(a,b) dd # code piece I am looking for if(subset(dd,c(1,23,ordered=F))is found))(

Re: [R] Lattice nb/wlist help

2011-04-27 Thread Gary Nobles
0011100 0011100 000 000 but I also want another matrix like this (D24): 000 010 010 010 010 010 000 and so on... If anyone can help I would be very grateful Gary -- View this message in context: http://r.789695.n4.nabble.com/Lattice-nb-wlist-help

[R] Help with matching rows

2011-04-20 Thread gary engstrom
e the chances of a duplicate row occur more often ? How do I export the dd data frame to excel? Deepest Gradtitude Gary [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] plot - kamada.kawai layout without arrows

2011-04-12 Thread Gary Weissman
aph)$arrow.size <- 0 plot(some.graph) OR plot(some.graph, edge.arrow.size=0) There are many great plotting features with the igraph package available here: http://igraph.sourceforge.net/doc/R/plot.common.html Best, Gary On Apr 12, 2011, at 6:00 AM, r-help-requ...@r-project.org wrote: > Me

Re: [R] Converting edgelist to symmetric matrix

2011-04-11 Thread Gary Weissman
g <- graph.data.frame(edge.list, directed=FALSE) get.adjacency(g, type="both", attr="weight") More options for exporting the adjacency matrix are here: http://igraph.sourceforge.net/doc/R/conversion.html If you give more details about your data format you might get more specific

[R] Lattice nb/wlist help

2011-02-02 Thread Gary Nobles
localG from package spdep: localG(x, listw, zero.policy=NULL, spChk=NULL) Any help is much appreciated. Thanks Gary -- View this message in context: http://r.789695.n4.nabble.com/Lattice-nb-wlist-help-tp3253962p3253962.html Sent from the R help mailing list archive at Nabble.com

[R] contiguity matrix (queens case)

2010-11-01 Thread Gary Nobles
ow in the example. Any help is much appreciated, I am slowly getting there! Thanks Gary -- View this message in context: http://r.789695.n4.nabble.com/contiguity-matrix-queens-case-tp3022184p3022184.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] R shp(ESRI) point patterns and marks

2010-11-01 Thread Gary Nobles
All fixed: I scaned in the data from x.txt and y.txt then: P<-ppp(x,y,c(...),c(...), marks=m) -- View this message in context: http://r.789695.n4.nabble.com/R-shp-ESRI-point-patterns-and-marks-tp3017683p3022165.html Sent from the R help mailing list archive at Nabble.com. _

[R] R shp(ESRI) point patterns and marks

2010-10-28 Thread Gary Nobles
ot spatial weighting)) Can anyone help? Thanks Gary -- View this message in context: http://r.789695.n4.nabble.com/R-shp-ESRI-point-patterns-and-marks-tp3017683p3017683.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org ma

Re: [R] Installing sp and rgdal libraries

2010-09-30 Thread Gary Nobles
hi thankyou for the help, I upgraded Ubuntu and it disabled some repositories, all fixed now -- View this message in context: http://r.789695.n4.nabble.com/Installing-sp-and-rgdal-libraries-tp2720313p2720493.html Sent from the R help mailing list archive at Nabble.com. _

[R] Installing sp and rgdal libraries

2010-09-30 Thread Gary Nobles
0.9.60 is required by 'rgdal' ERROR: lazy loading failed for package ârgdalâ * removing â/home/gary/R/x86_64-pc-linux-gnu-library/2.10/rgdalâ The downloaded packages are in â/tmp/RtmpCtm6wH/downloaded_packagesâ Warning message: In install.packages("rgdal") : installatio

[R] multiple imputation based on a condition

2010-05-22 Thread Gary Collins
mi or Amelia)? I thought the passive imputation approach in MICE would be the way forward but I've so far been unsuccessful. Thanks in advance. Gary __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] Multi-panel Pie Charts.

2010-03-24 Thread Gary Miller
Gurmeet and I are looking for such utility. It could be helpful! On Wed, Mar 24, 2010 at 3:46 PM, Gary Miller wrote: > Thanks for your reply Sharpie. I completely understand that it may not be > the best to go with muti-panel pie charts, but my group would like to have > this utility a

Re: [R] Multi-panel Pie Charts.

2010-03-24 Thread Gary Miller
Thanks for your reply Sharpie. I completely understand that it may not be the best to go with muti-panel pie charts, but my group would like to have this utility along with barplot/dotplot (may be, using it for proportions data). Thanks, ~Gurmeet On Wed, Mar 24, 2010 at 3:38 PM, Sharpie wrote:

[R] print() / split()

2010-02-11 Thread Gary Miller
Hi All, Can anyone please tell me what is the meaning of four coordinates in below print statement. Currently its dividing plotting window into 1 X 2 and I want to change it to 2 X 2 [ equivalent of par(mfrow=c(2,2)) ]. Thanks, require(lattice) p1=barchart(yield ~ variety | site, data = barley,

Re: [R] Can you delete me from the list I don't want to receive the emails from the forum anymore, thank you!

2009-12-20 Thread Gary Miller
A couple of week back someone posted this. It applies to you too: None of the people reading this at the moment can do this for you. Read the information on the page where you subscribed.: https://stat.ethz.ch/mailman/listinfo/r-help Q: How many psychiatrists does it take to unscrew a light bulb

Re: [R] DROP and KEEP statements in R

2009-12-19 Thread Gary Miller
Try this, library(lattice) data(barley) names(barley) # Removing first column barley <- barley[,c(-1)] names(barley) # Keeping 1st and 3rd column barley <- barley[,c(1,3)] names(barley) HTH, Gary On Sat, Dec 19, 2009 at 3:21 PM, wrote: > What is equivalent to DROP or KEEP statemen

Re: [R] ggplot2 / lattice

2009-12-18 Thread Gary Miller
lattice) bwplot(val ~ g | G2, dta, panel = function(x,y,...) { panel.bwplot(x,y,..., pch="|", col="red", fill="red", box.width=.3) } ) Thanks, Gary On Thu, Dec 17, 2009 at 11:01 PM, Felix Andrews wrote: > Look at ?panel.bwplot specifically 'fil

Re: [R] ggplot2 / lattice

2009-12-17 Thread Gary Miller
"B", "C", "D"), 125) t <- rnorm(5000) a <- sample(t, 500, replace=TRUE) b <- sample(t, 500, replace=TRUE) dta <- data.frame(val = sample(t,1000), g = gl(4, 250, labels=c("A", "B", "C", "D")) , G2 = gl(2,1, labels=c("

[R] ggplot2 / lattice

2009-12-17 Thread Gary Miller
- sample(t, 500, replace=TRUE) dta <- data.frame(val = sample(t,1000), g = gl(4, 250, labels=c("A", "B", "C", "D")) , G2 = gl(2,1, labels=c("XX", "YY"))) # ggplot2 package required p <- ggplot(dta, aes(factor(G2), val)) p + geo

Re: [R] re-ordering x-lables using barchart()

2009-12-08 Thread Gary Miller
@ David and Phil: Thanks for your suggestions. @ Xin: Are you also working with barchart()? -Gary On Tue, Dec 8, 2009 at 5:23 PM, Phil Spector wrote: > Gary - > If you create an ordered factor, barchart will plot the > sites in the order you specify. For example, try > &

[R] re-ordering x-lables using barchart()

2009-12-08 Thread Gary Miller
ylab = "Barley Yield (bushels/acre)", scales = list(x = list(abbreviate = TRUE, rot=45, minlength = 5))) Can anyone help please. -Gary [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/

Re: [R] barchart() {lattice} help.

2009-12-06 Thread Gary Miller
Thanks Uwe, I got your suggestions part too. 2009/12/6 Uwe Ligges > > > Peng Cai wrote: > >> Hi, >> >> I'm plotting grouped barplot using following code and data. I need help >> with >> re-ordering the labels. >> >> 1. On x-axis the factor "AGE" is grouped in order "0--4", "15--18", >> "5--14";

Re: [R] SAS "datalines" or "cards" statement equivalent in R?

2009-12-06 Thread Gary Miller
Thanks Dennis and Jorge! On Sat, Dec 5, 2009 at 8:24 PM, Jorge Ivan Velez wrote: > Dear Gary, > > Here is a suggestion using read.table() and textConnection(): > > toread <- "id sex age inc r1 r2 r3 > 1 F 35 17 7 2 2 > 17 M 50 14 5 5 3 > 33 F 45 6 7 2

[R] SAS "datalines" or "cards" statement equivalent in R?

2009-12-05 Thread Gary Miller
65 F 52 9 4 7 7 81 M 44 11 7 7 7 2 F 34 17 6 5 3 18 M 40 14 7 5 2 34 F 47 6 6 5 6 50 M 35 17 5 7 5 ; Any help would be highly appreciated, Gary [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Grouped Boxplot

2009-11-26 Thread Gary
> boxwex=0.8) > > > > This should have shown up with this: > > > > RSiteSearch("grouped boxplot") > > or ggplot2 variant > > p <- ggplot(dta, aes(factor(G2), val)) > p + geom_boxplot(aes(fill = factor(g))) > > Regards > Petr >

Re: [R] Grouped Barplot

2009-11-25 Thread Gary
I'm able to add legend. ~Gary On Wed, Nov 25, 2009 at 3:15 PM, Gary wrote: > Thanks David. I reduced the data set and its copied below (also attached to > this email as text file). Now N=50, Only 2 years, Only 2 Cities. I tried: > > foo<-read.table("SampleData.txt&quo

Re: [R] Grouped Barplot

2009-11-25 Thread Gary
Sample: http://www.imachordata.com/wp-content/uploads/2009/09/boxplot.png Thanks! On Wed, Nov 25, 2009 at 2:45 PM, David Winsemius wrote: > > On Nov 25, 2009, at 1:48 PM, Gary wrote: > > Hi R Users, >> >> I tried plotting a similar boxplot as it is on the FOLLOWING LINK: >

[R] Grouped Barplot

2009-11-25 Thread Gary
"Year", I need to plot FIVE boxplots -- one for each "City". [so it will look like nine clusters with five boxplots each (with no gap between them, but with gaps between year labels]. 3) Adding "MEAN" to the boxplots. 4) And, legend i

[R] Grouped Boxplot

2009-11-23 Thread Gary
Hi R Users, I'm interested in plotting a grouped boxplot (please see attached file for sample). Can anyone suggest a function{package} which can help me achieve this. Thanks, Gary __ R-help@r-project.org mailing list https://stat.ethz.ch/ma

Re: [R] Translation from R codes to SAS.

2009-11-23 Thread Gary
Until someone agrees to your request, you may want to look into this book: http://www.amazon.com/SAS-Management-Statistical-Analysis-Graphics/dp/1420070576 <http://www.amazon.com/SAS-Management-Statistical-Analysis-Graphics/dp/1420070576> ~Gary On Mon, Nov 23, 2009 at 4:35 PM, ychu066

Re: [R] title problem

2009-11-21 Thread Gary
ne1\nMain title line2", cex.main=1.5, line=1, sub = "Sub title line1\nSub title line2", cex.sub = 0.75, outer = TRUE) ~Gary On Sat, Nov 21, 2009 at 1:09 PM, David Winsemius wrote: > > On Nov 21, 2009, at 12:57 PM, Gabor Grothendieck wrote: > > Try the line= argument on

Re: [R] title problem

2009-11-21 Thread Gary
1,2,3), c(9,8,7)) title(sub ="sub title 1", cex.sub = 0.75) plot(c(1,2,3), c(9,8,7)) title(sub ="sub title 2", cex.sub = 0.75) title(main = "Main title", cex.main=1.5, outer = TRUE) Not sure about how to do it for a single "sub title" for whole graph.

Re: [R] title problem

2009-11-21 Thread Gary
ine of the plot. Arguments here are for "bottom", "left", "top", "right"; which ofcourse can be changed according to need. HTH ~Gary On Sat, Nov 21, 2009 at 11:21 AM, carol white wrote: > Hi, > I got problem in using title function to create a tit

[R] Stacked Bar Plot

2009-11-20 Thread Gary
categorical variables. Can anyone help me? Thanks, Gary [[alternative HTML version deleted]] __ 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

Re: [R] R and REST API's

2009-09-29 Thread Gary Lewis
Thanks to all of you who replied. You've provided some great leads. I really appreciate it. Gary On Mon, Sep 28, 2009 at 10:01 AM, Gary Lewis wrote: > Hi - Many organizations now make their data available as XML via a > REST web service architecture. Is there any R package or

[R] R and REST API's

2009-09-28 Thread Gary Lewis
look for an answer, but came up with very little. Any help would be appreciated. Thanks very much. Gary Lewis __ 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

Re: [R] xyplot: superpose 2 time series with different time intervals

2009-08-03 Thread Gary Lewis
Thank you Deepayan. Your suggestion worked perfectly. Thanks too to Gabor for your suggestion and for your help trying to get this help request through to r-help before I subscribed. I'm all set now. Gary On Sat, Aug 1, 2009 at 1:17 PM, Deepayan Sarkar wrote: > On Sat, Aug 1, 2009 at

[R] xyplot: superpose 2 time series with different time intervals

2009-08-01 Thread Gary Lewis
tervals but line connections across the NA's in the series with annual intervals. Any suggestions would be appreciated. Thanks. Gary Lewis __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the postin

[R] superpose 2 time series with different time intervals

2009-08-01 Thread Gary Lewis
connections across the NA's in the series with annual intervals. Any suggestions would be appreciated. Thanks. Gary Lewis __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://

Re: [R] discrepancies between stata and r for a cox regression

2009-05-18 Thread Gary Collins
r ties in the output of running a cox model. HTH Gary --- Dr Gary S Collins Tel: +44 (0)1865 284418 Centre for Statistics in Medicine Fax: +44 (0)1865 284424 Wolfson College Annexewww.csm-o

[R] FW: can't get package boot to load

2009-01-31 Thread Gary Smith
Changing library(RODBC,boot) to library(RODBC) library(boot) seems to have solved the problem. _ _ From: Gary Smith [mailto:gary.smit...@comcast.net] Sent: Saturday, January 31, 2009 12:55 PM To: 'r-help@R-project.org

[R] can't get package boot to load

2009-01-31 Thread Gary Smith
of my problem. Apologies if I've missed the obvious. My code is simple: install.packages('RODBC') install.packages('boot') library(RODBC,boot) setwd("C:/Documents and Settings/Gary Smith/My Documents/Blog/") data = odbcConnectExcel("LafferCurve2.x

[R] Help with lattice

2008-10-23 Thread Nelson, Gary (FWE)
oess function from being applied to data for a particular panel, but still allow to points to be plotted? Thanks for your help. Gary Nelson __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] fast value replacement in (numeric) vector

2008-09-20 Thread Ling, Gary (Electronic Trading)
yes, yes! I'm out of my mind. Thank you. -Original Message- From: hadley wickham [mailto:[EMAIL PROTECTED] Sent: Saturday, September 20, 2008 5:49 PM To: Ling, Gary (Electronic Trading) Cc: r-help@r-project.org Subject: Re: [R] fast value replacement in (numeric) vector On Sat, S

[R] fast value replacement in (numeric) vector

2008-09-20 Thread Ling, Gary (Electronic Trading)
time(replicate(500, L <- replace(L,n,0))) user system elapsed 0.936 0.973 1.909 I look forward to hear your opinion. Thanks in advance, Gary This message w/attachments (message) may be privileged, confidential or proprieta

Re: [R] loop with splitted data

2008-09-10 Thread Ling, Gary (Electronic Trading)
YES! many many thanks, Jim. I know it'd be simple, yet I can't believe it's that simple. =) -gary -Original Message- From: jim holtman [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 10, 2008 11:55 AM To: Ling, Gary (Electronic Trading) Cc: Peter Dalgaard; r-hel

Re: [R] loop with splitted data

2008-09-10 Thread Ling, Gary (Electronic Trading)
work. # I feel that I need a string or something to tell lapply what I want. This is a simplify version of my problem; in my case, I can't name all the sub-lists, please help. Thanks in advance, Gary -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

[R] replacing missing values in a dataframe with reference values.

2008-08-21 Thread Gary Collins
$sex == X$sex[i] & refval$agegroup == X$agegroup[i]] } } Which not only is this ugly, but is slow, in that my actual dataset is over 1 million rows with 5 or 6 variables to check and replace missing values. Thanks in advance for any help. Gary

  1   2   >