search for: drjimlemon

Displaying 20 results from an estimated 253 matches for "drjimlemon".

2016 Apr 12
2
Adding Two-Headed Arrow in map legend
Hello Jim, Thanks again. I am getting the two-headed arrow but I cannot seem to get the coordinates right for the arrow to appear beneath the map. These coordinates puts the arrow on the left hand side. Thanks again! Sincerely, Milu On Tue, Apr 12, 2016 at 1:15 PM, Jim Lemon <drjimlemon at gmail.com> wrote: > Hi Milu, > There is a two-headed arrow on the image you sent, and it seems to be > where you specified. Did you want it beneath the map, as: > > par(xpd=TRUE) > arrows(-22,54.75,-22,74,code=3) > par(xpd=FALSE) > > Jim > > On Tue, Apr 12, 2...
2018 Mar 20
0
Struggling to compute marginal effects !
...effect.Somehow_reliable > effect.Very reliable > Adopt -0.073 -0.057 > -0.064 0.193 > Training -0.283 -0.135 > -0.051 0.469 > > > On Mon, Mar 19, 2018 at 6:46 PM, Jim Lemon <drjimlemon at gmail.com> wrote: >> >> Hi Willy, >> I had a look at the "erer" manual, and it looks like a (somewhat) >> misleading error message. I don't know where "Inc_reliable_fromNTA" >> may be, but it looks like the ocME function can't find it,...
2017 Aug 29
2
help with read.csv() for files with different number of columns
Thank you very much! Looks like I have to know the length of each record ahead of time. Ace On Monday, August 28, 2017 12:56 AM, Jim Lemon <drjimlemon at gmail.com> wrote: Hi Ace, With tabs as separators: testdf<-read.table("test.txt",header=FALSE,fill=TRUE,sep="\t", col.names=paste("V",1:19,sep=""),stringsAsFactors=FALSE) Also note that I got the number of columns wrong the first time. Jim O...
2018 May 07
0
Adding Year-Month-Day to X axis
...300, cex.axis=1.0, label="5:00") > axis (side=2, at=360, cex.axis=1.0, label="6:00") > axis (side=2, at=420, cex.axis=1.0, label="7:00") > axis (side=2, at=480, cex.axis=1.0, label="8:00") > > On May 6, 2018, at 3:52 AM, Jim Lemon <drjimlemon at gmail.com> wrote: > > Hi Greg, > By default, the "axis" function puts the labels on one line and drops > labels that would overlap. When you have labels that are all the same > length, this usually results in every second, or third, or fourth > label being displaye...
2016 Apr 13
0
Adding Two-Headed Arrow in map legend
...ain. I am getting the two-headed arrow but I cannot seem to get the > coordinates right for the arrow to appear beneath the map. These coordinates > puts the arrow on the left hand side. Thanks again! > > Sincerely, > > Milu > > On Tue, Apr 12, 2016 at 1:15 PM, Jim Lemon <drjimlemon at gmail.com> wrote: >> >> Hi Milu, >> There is a two-headed arrow on the image you sent, and it seems to be >> where you specified. Did you want it beneath the map, as: >> >> par(xpd=TRUE) >> arrows(-22,54.75,-22,74,code=3) >> par(xpd=FALSE) >&...
2018 May 05
0
Adding Year-Month-Day to X axis
Hi Greg, What you are getting there is a factor, interpreted as a 1:n sequence based on the sort order of your "dates". Here's a way to get dates on your x-axis in the format you want: x_yyyymmdd<-as.Date(c("2018-04-25","2018-04-26","2018-04-27",
2017 Aug 29
0
help with read.csv() for files with different number of columns
...fields(test.txt,"\t") Jim On Wed, Aug 30, 2017 at 2:22 AM, Fix Ace <acefix at rocketmail.com> wrote: > Thank you very much! Looks like I have to know the length of each record > ahead of time. > > Ace > > > On Monday, August 28, 2017 12:56 AM, Jim Lemon <drjimlemon at gmail.com> wrote: > > > Hi Ace, > With tabs as separators: > > testdf<-read.table("test.txt",header=FALSE,fill=TRUE,sep="\t", > col.names=paste("V",1:19,sep=""),stringsAsFactors=FALSE) > > Also note that I got the number of...
2018 May 07
2
Adding Year-Month-Day to X axis
...axis (side=2, at=300, cex.axis=1.0, label="5:00") axis (side=2, at=360, cex.axis=1.0, label="6:00") axis (side=2, at=420, cex.axis=1.0, label="7:00") axis (side=2, at=480, cex.axis=1.0, label="8:00") > On May 6, 2018, at 3:52 AM, Jim Lemon <drjimlemon at gmail.com> wrote: > > Hi Greg, > By default, the "axis" function puts the labels on one line and drops > labels that would overlap. When you have labels that are all the same > length, this usually results in every second, or third, or fourth > label being display...
2017 Aug 31
2
Converting character to numeric using the package "XLConnect"
...t; strtoi(set[index]) ## This works: all values are numeric !!! [1] 1 2 3 4 2 8 9 7 > set[index] <- strtoi(set[index]) > print(set[10,1]) ## Problem: must be numeric !!!! [1] "1" Thanks very much for your help. Nell ________________________________ De : Jim Lemon <drjimlemon at gmail.com> Envoy? : mercredi 30 ao?t 2017 15:00:32 ? : Nelly Reduan; r-help mailing list Objet : Re: [R] Converting character to numeric using the package "XLConnect" Hi Nelly, Are you trying to convert hexadecimal to decimal? nrdf Setting Value 1 Parameters a 2 Param...
2018 Feb 25
3
include
...l1 Col2 col3 1 <NA> <NA> <NA> 2 X1 <NA> <NA> 3 Y1 <NA> <NA> 4 K2 <NA> <NA> 5 W1 <NA> <NA> 6 Z1 K1 K2 7 Z2 <NA> <NA> 8 Z3 X1 <NA> 9 Z4 Y1 W1 On Sat, Feb 24, 2018 at 6:18 PM, Jim Lemon <drjimlemon at gmail.com> wrote: > hi Val, > Your problem seems to be that the data are read in as a factor. The > simplest way I can think of to get around this is: > > mydat <- read.table(textConnection("Col1 Col2 col3 > Z1 K1 K2 > Z2 NA NA > Z3 X1 NA > Z4 Y1 W1"),...
2018 Feb 25
2
include
...l3 1 X1 0 0 2 K1 0 0 3 Y1 0 0 4 W1 0 0 6 K2 X1 0 7 Z1 K1 K2 8 Z2 0 0 9 Z3 X1 0 10 Z4 Y1 W1 K2 is already is already in col1 and should not be added. Thank you in advance On Sat, Feb 24, 2018 at 6:38 PM, Jim Lemon <drjimlemon at gmail.com> wrote: > Hi Val, > My fault - I assumed that the NA would be first in the result produced > by "unique": > > mydat <- read.table(textConnection("Col1 Col2 col3 > Z1 K1 K2 > Z2 NA NA > Z3 X1 NA > Z4 Y1 W1"),header = TRUE,stringsAsFa...
2017 Nov 30
2
Data cleaning & Data preparation, what do R users want?
Hi again, Typo in the last email. Should read "about 40 standard deviations". Jim On Thu, Nov 30, 2017 at 10:54 AM, Jim Lemon <drjimlemon at gmail.com> wrote: > Hi Robert, > People want different levels of automation in the software they use. > What concerns many of us is the desire for the function > "figure-out-what-this-data-is-import-it-and-get-rid-of-bad-values". > Such users typically want something...
2018 Feb 25
0
include
...X1 <NA> <NA> > 3 Y1 <NA> <NA> > 4 K2 <NA> <NA> > 5 W1 <NA> <NA> > 6 Z1 K1 K2 > 7 Z2 <NA> <NA> > 8 Z3 X1 <NA> > 9 Z4 Y1 W1 > > > > On Sat, Feb 24, 2018 at 6:18 PM, Jim Lemon <drjimlemon at gmail.com> wrote: >> >> hi Val, >> Your problem seems to be that the data are read in as a factor. The >> simplest way I can think of to get around this is: >> >> mydat <- read.table(textConnection("Col1 Col2 col3 >> Z1 K1 K2 >> Z2 NA NA...
2016 Apr 19
5
Interquartile Range
That didn't work Jim! Thanks anyway On Mon, Apr 18, 2016 at 9:02 PM, Jim Lemon <drjimlemon at gmail.com> wrote: > Hi Michael, > At a guess, try this: > > iqr<-function(x) { > return(paste(round(quantile(x,0.25),0),round(quantile(x,0.75),0),sep="-") > } > > .col3_Range=iqr(datat$tenure) > > Jim > > > > On Tue, Apr 19, 2016 at 11:...
2020 Sep 30
0
2 KM curves on the same plot
...efualt plot region! > > So I just comment out the last 2 lines of the above 3 lines, and created a customized lines2 function. Now it works! > > It's fun to learn clip(). > > Thanks, > > John > > > On Wednesday, September 30, 2020, 01:47:55 AM PDT, Jim Lemon <drjimlemon at gmail.com> wrote: > > > Hi John, > Hmmm, this works: > > plot(1:10) > xylim<-par("usr") > clip(5,xylim[2],xylim[3],xylim[4]) > lines(10:1) > > so I suspect that there is a "lines" method that resets the clipping > region out of sight....
2018 Feb 25
0
include
...0 0 >6 K2 X1 0 >7 Z1 K1 K2 >8 Z2 0 0 >9 Z3 X1 0 >10 Z4 Y1 W1 > >K2 is already is already in col1 and should not be added. > >Thank you in advance > > > > > > > >On Sat, Feb 24, 2018 at 6:38 PM, Jim Lemon <drjimlemon at gmail.com> >wrote: > >> Hi Val, >> My fault - I assumed that the NA would be first in the result >produced >> by "unique": >> >> mydat <- read.table(textConnection("Col1 Col2 col3 >> Z1 K1 K2 >> Z2 NA NA >> Z3 X1 NA &g...
2018 May 01
2
how can I convert a long to wide matrix?
...therefore I want to take the first value if there are repeated within a same group of "timeGroup". Therefore I wanted following FinalData1 B1 B2 id_X "A" "B" id_Y "A" "B" thanks, On Tue, May 1, 2018 at 4:05 PM, Jim Lemon <drjimlemon at gmail.com> wrote: > Hi Marna, > I think this is due to having three rows for id_X and only two for > id_Y. The function creates a data frame with enough columns to hold > the greatest number of values for each ID variable. Notice that the > SITE_n columns contain three values...
2018 Feb 24
2
include
Thank you Jim I wanted a final data frame after replacing the NA's to "0" x1 = rbind(unique(preval),mydat) x2 <- x1[is.na(x1)] <- 0 x2 but I got this, [1] 0 why I am getting this? On Sat, Feb 24, 2018 at 12:17 AM, Jim Lemon <drjimlemon at gmail.com> wrote: > Hi Val, > Try this: > > preval<-data.frame(Col1=unique(unlist(mydat[,c("Col2","col3")]))[-1], > Col2=NA,col3=NA) > rbind(preval,mydat) > > Jim > > On Sat, Feb 24, 2018 at 3:34 PM, Val <valkremk at gmail.com> wrot...
2015 Feb 07
3
how to draw paired mosaic plot?
...ot of every pair of each variable,how to do then? If the variables are numeric, I can use pairs to get paired scatter plot. But as to the character variables, how to get the "paired mosaic plot"? Many thanks. -- QQ: 1733768559 At 2015-02-07 17:04:26,"Jim Lemon" <drjimlemon at gmail.com> wrote: >Hi meng, >It's not too hard to get a mosaic plot of two character variables: > >x<-sample(LETTERS[1:3],20,TRUE) >y<-sample(LETTERS[24:26],20,TRUE) >mosaicplot(table(x,y)) > >If you could tell us how the above is not what you want, perhaps a...
2017 Oct 31
1
Scatterplot3d :: Rotating x tick labels by x degrees
On 31.10.2017 00:56, Alex Restrepo wrote: > Hi, > > I would like to rotate the x axis tick labels by 45 degrees. Using the code below, could someone please provide an example? Many Thanks In Advance, Alex 45 degree rotation is not supported in base R graphics and scatterplot3d uses that. You can use par(las=2) before your code and get them rrotated by 90 degrees, or you can add