Re: [R] Exceptional slowness with read.csv

2024-04-08 Thread jim holtman
Try reading the lines in (readLines), count the number of both types of quotes in each line. Find out which are not even and investigate. On Mon, Apr 8, 2024, 15:24 Dave Dixon wrote: > I solved the mystery, but not the problem. The problem is that there's > an unclosed quote somewhere in those 5

Re: [R] Trouble reading a UTF-16LE file

2024-02-28 Thread jim holtman
Try this: > x <- file("C:\\Users\\Jim\\Downloads\\PV2-ch2 - R_Help.ANA",+ > encoding = "UTF-16")> y <- readLines(x)> head(y)[1] "1\t36,74\t0" > "2\t269,02\t-44" "1\t326,62\t29""2\t354,52\t24"

Re: [R] Help request: Parsing docx files for key words and appending to a spreadsheet

2023-12-29 Thread jim holtman
checkout the 'officer' package Thanks Jim Holtman *Data Munger Guru* *What is the problem that you are trying to solve?Tell me what you want to do, not how you want to do it.* On Fri, Dec 29, 2023 at 10:14 AM Andy wrote: > Hello > > I am trying to work through a problem,

Re: [R] strptime with +03:00 zone designator

2023-11-05 Thread jim holtman
try using 'lubridate' > library(lubridate)Attaching package: ‘lubridate’ The following objects are masked from ‘package:base’: date, intersect, setdiff, union > x <- "2017-02-28T13:35:00+03:00"> ymd_hms(x)[1] "2017-02-28 10:35:00 UTC" > Than

Re: [R] Sum data according to date in sequence

2023-11-03 Thread jim holtman
2:00", "8:58"), EnergykWh = c(4.680496, 6.272414, 1.032782, 11.004884, 10.096824, 6.658797, 4.808874, 1.469384, 2.996239, 0.303222, 4.988339, 8.131804, 0.117156, 3.285669, 1.175608, 3.677487, 1.068393, 8.820755, 8.138583, 9.0575)), row.names = c(NA, 20L), class = "dat

Re: [R] Sum data according to date in sequence

2023-11-02 Thread jim holtman
How about send a 'dput' of some sample data. My guess is that your date is 'character' and not 'Date'. Thanks Jim Holtman *Data Munger Guru* *What is the problem that you are trying to solve?Tell me what you want to do, not how you want to do it.*

Re: [R] How to Reformat a dataframe

2023-10-28 Thread jim holtman
2 ...6 61.019 2 ...7 63.020 2 ...8 93.0 > Thanks Jim Holtman *Data Munger Guru* *What is the problem that you are trying to solve?Tell me what you want to do, not how you want to do it.* On Fri, Oct 27, 2023 at 10:41 PM Paul Bernal wrote: > Hi Iris, > > Thank you so mu

Re: [R] Fwd: r-stats: Geometric Distribution

2023-10-18 Thread Jim Lemon
Please delete drjimle...@gmail.com from your mailing lists. He passed away a mknth ago. Regards, Juel Wife On Tue, 17 Oct 2023, 22:58 Sahil Sharma -- Forwarded message - > From: Sahil Sharma > Date: Tue, Oct 17, 2023 at 12:10 PM > Subject: r-stats: Geometric Distribution > To: >

Re: [R] Best way to test for numeric digits?

2023-10-18 Thread Jim Lemon
Please delete drjimle...@bitwrit.com from your mailing list. He passed away a month ago. Regards, Juel (wife) On Thu, 19 Oct 2023, 02:09 Ben Bolker There are some answers on Stack Overflow: > > > https://stackoverflow.com/questions/14984989/how-to-avoid-warning-when-introducing-nas-by-coercio

Re: [R] save(), load(), saveRDS(), and readRDS()

2023-10-04 Thread Jim Lemon
Hello, I am very sad to let you know that my husband Jim died on 18th September. I apologise for not letting you know earlier but I had trouble finding the password for his phone. Kind regards, Juel On Fri, 29 Sep 2023, 01:48 Shu Fai Cheung Hi All, > > There is a thread about the use o

Re: [R] Problems Structuring My Data

2023-10-04 Thread Jim Lemon
Hello, I am very sad to let you know that my husband Jim died in 18th September. I apologise for not letting you know earlier but I had trouble finding the password for his phone. If you wish to do an obituary please let me know by emailing juelsallybri...@gmail.com, I can send info through. Kind

Re: [R] download.file strict certificate revocation check

2023-10-04 Thread Jim Lemon
Hello, I am very sad to let you know that my husband Jim died in 18th September. I apologise for not letting you know earlier but I had trouble finding the password for his phone. Kind regards, Juel Briggs On Thu, 5 Oct 2023, 02:07 Ivan Krylov В Wed, 4 Oct 2023 14:32:49 + > John Neset пи

Re: [R] How to create an R input

2023-08-30 Thread Jim Lemon
to add? ")) if(is.numeric(xinc)) x<-x+xinc answer<-unlist(strsplit(readline("Do you want to keep doing this? (y/n) "),""))[1] finished<-toupper(answer)!="Y" } return(x) } Jim On Thu, Aug 31, 2023 at 11:46 AM Jeff Reichman wrote: > > R Hel

Re: [R] OFF TOPIC: chatGPT glibly produces a lot of wrong answers?

2023-08-13 Thread Jim Lemon
failure of communication, the questioner frames the question in a way that may be figured out by a human, but is not logically consistent. It is the basis for some very funny scenes in Douglas Adams' "Hitchhiker" series, but can be intensely frustrating to both parties in real life. Jim

Re: [R] Seeking Assistance: Plotting Sea Current Vectors in R

2023-07-25 Thread Jim Lemon
Hi Kostas, The function vectorField in the plotrix package may do what you want. See the example. Jim On Tue, Jul 25, 2023 at 9:30 PM konstantinos christodoulou wrote: > > Dear Rcommunity, > > I hope this email finds you well. I am writing to seek your assistance with > a dat

Re: [R] Off-topic: ChatGPT Code Interpreter

2023-07-17 Thread Jim Lemon
mploy AI to translate my mental images into realistic pictures. Perhaps we really are learning about how we think. As far as I am aware, it just does what we tell it to do. Like other tools, it is as good or bad as the user. Jim __ R-help@r-projec

Re: [R] ggplot: Can plot graphs with points, can't plot graph with points and line

2023-07-12 Thread Jim Lemon
Hi John, I'm not sure how to do this with ggplot, but: Time<- c("Age.25","Age.35","Age.45","Age.55") Medians<-c(128.25,148.75,158.5,168.75) > is.character(Time) # [1] TRUE - thus it has no intrinsic numeric value to plot > is.numeric(Medians) # [1] TRUE # coerce Medians to factor and then plot aga

Re: [R] Plotting factors in graph panel

2023-06-29 Thread Jim Lemon
lab="Income",ylab="%",xaxt="n") axis(1,at=1:5,labels=at_df$Income) plot(at_df[,"MF_Debt"], type="l",lwd=3,main="MF_Debt", xlab="Income",ylab="%",xaxt="n") axis(1,at=1:5,labels=at_df$Income) dev.off() Jim On Th

Re: [R] Plotting factors in graph panel

2023-06-28 Thread Jim Lemon
uot;Bank_None","Bank_Current","Bank_Savings")], type="l",col=1:3,lty=1:4,lwd=3, main="Percentages by Income and Bank type", xlab="Income",ylab="Percentage of group",xaxt="n") axis(1,at=1:5,labels=at_df$Income) legend(3,

Re: [R] Plotrix pyramid plot: request for a little help

2023-06-06 Thread Jim Lemon
s not a good idea to request different labels, as the plot won't be correct. I added the unit="Count", which you can delete if you don't want it. I think it's a good idea to let the viewer know what the units are. I have also attached an ima

Re: [R] Plotrix pyramid plot: request for a little help

2023-06-06 Thread Jim Lemon
Hi Mohsin, As I don't have your data, I had to fake it, so there are probably some mistakes in the example below: # my suggestion x<-c(143,108,95,72,70,85,125,123,64,67,144,55,60,200,70,100,65,140,49,45,77,58,66,50,77) y<-c(41,32,28,13,15,29,72,71,17,180,9,13,145,29,56,22,97,13,9,42,20,7,30,10,41)

Re: [R] Circular plot - polar plot code questions

2023-04-24 Thread Jim Lemon
="State", varlabels=c("Testiular enlargement","Pregnant","Lactatins"), timelabels=month.abb) dev.off() Jim On Mon, Apr 24, 2023 at 7:22 PM Bruce Miller wrote: > > Hi all... > I assume there are a host of GGplot2 users out there. > I have circular

Re: [R] Query about code

2023-04-22 Thread Jim Lemon
Hi Yeswanth, As it says on the bottom ofthe first page, the corresponding author it: yangj...@ms.xjb.ac.cn Try that email address. Jim On Sat, Apr 22, 2023 at 2:59 PM ADIGARLA YESWANTH NAIDU <102213...@smail.iitpkd.ac.in> wrote: > > Thanks for your reply sir , > Here is the refe

Re: [R] Query about code

2023-04-21 Thread Jim Lemon
Hi Yeswanth, You seem to be referring to a specific publication by a specific author. Unless someone in R-help knows who and what you are referring to, it seems very difficult. Perhaps you could supply a reference to the work you are using? JIm On Sat, Apr 22, 2023 at 7:03 AM ADIGARLA YESWANTH

Re: [R] single character in R, and how to manipulate it

2023-03-30 Thread Jim Lemon
Also see the "arctext" function in the plotrix package. Jim On Fri, Mar 31, 2023 at 11:12 AM Jim Lemon wrote: > > Hi Jinsong, > Maybe "srt" will do what you want. As you noted non-orthogonal > rotations may not work on some devices. You may be able to download

Re: [R] single character in R, and how to manipulate it

2023-03-30 Thread Jim Lemon
Hi Jinsong, Maybe "srt" will do what you want. As you noted non-orthogonal rotations may not work on some devices. You may be able to download mirror fonts from places like fontmirror.com, but it more complicated. Jim On Thu, Mar 30, 2023 at 7:25 PM Jinsong Zhao wrote: > > H

Re: [R] Shaded area

2023-03-12 Thread Jim Lemon
eeded for curves that are above the criterial value at the beginning or end, and a corresponding argument to fill the area _below_ the criterial value. If it is useful, I can probably do a bit more work on it. Jim On Fri, Mar 3, 2023 at 11:58 PM John Kane wrote: > > As Peter says, the l

Re: [R] MFA variables graph, filtered by separate.analyses

2023-02-21 Thread Jim Lemon
Hi Gavin, I can't work through this right now, but I would start by looking at the 'hetcor' package to get the correlations, or if they are already in the return object, build a plot from these. Jim On Wed, Feb 22, 2023 at 4:24 AM gavin duley wrote: > > Hi! > > A

Re: [R] Question about italics in legendg() - plotrix

2023-02-14 Thread Jim Lemon
uot;Saguinus oedipus","Lemur catta","Galago senegalensis"), pch=list(c(15,0),c(16,1),c(17,2),c(18,5),c(19,10)), col=list(c("royalblue","skyblue1"), c("chocolate","gold"),c("deeppink","lightpink"), c("black&qu

Re: [R] overlaying two graphs / plots /lines

2023-02-07 Thread Jim Lemon
lim=xrange,ylim=yrange,col="red") lines(B,lty=2,col="blue") legend(150,400,c("A","B"),lty=1:2,col=c("red","blue")) There are other tricks to deal with the differences in range between A and B. Jim On Wed, Feb 8, 2023 at 7:57 AM Bogdan Ta

Re: [R] Extracting data using subset function

2023-02-05 Thread Jim Lemon
tries use integers as indices So the problem is really to reduce your selection criteria to a vector of TRUER/FALSE values. Jim On Mon, Feb 6, 2023 at 1:07 AM Upananda Pani wrote: > > Dear All, > > I want to create a vector p and extract first 20 observations using subset > fu

Re: [R] Reg: To change the x axis label in ts.plot function

2022-12-24 Thread Jim Lemon
2020-01-27"),end=as.Date("2021-07-26"), frequency=1/7) plot(pricet,xaxt="n") axis_dates<-as.Date(c("2020-06-30","2021-01-01","2021-06-30")) axis(1,at=axis_dates,labels=format(axis_dates,"%d/%m/%Y")) Jim On Sun, Dec 25, 2022 at 5:58 AM U

Re: [R] query in loops

2022-12-05 Thread jim holtman
So what is the problem that you would like help in correcting? The program seems to run. Thanks Jim Holtman *Data Munger Guru* *What is the problem that you are trying to solve?Tell me what you want to do, not how you want to do it.* On Mon, Dec 5, 2022 at 12:59 PM ASHLIN VARKEY wrote

Re: [R] Format printing with R

2022-11-21 Thread Jim Lemon
32 16.31 [4,] 0.510.50 [5,] 0.490.50 [6,] 0.700.46 [7,] 0.300.46 [8,] 0.800.40 [9,] 0.200.40 I don't think it is your use of "cbind", but I didn't edit out Mean and Std.dev and try it. Jim On Tue, Nov 22, 2022 at 7:41 AM Steven T. Yen via R-help wr

Re: [R] Plotting a triangular prism

2022-11-10 Thread Jim Lemon
in a composite image in something like the GIMP. Jim > > On Nov 10, 2022, at 5:46 PM, Erin Hodgess wrote: > > > > Hello! > > > > I’m trying to draw a triangular prism. I have used rgl, plot3d, and it’s > > still not working as I would like. > > > &

Re: [R] Unsubscribe from mailing list please

2022-11-01 Thread Jim Lemon
Hi Eva, As it says in the footer, go here: https://stat.ethz.ch/mailman/listinfo/r-help Jim On Wed, Nov 2, 2022 at 6:51 AM Eva Maria Leunissen wrote: > > Hi, > > Could I please unsubscribe from the R-help mailing list? > > Thanks > > Eva > > [[al

Re: [R] pairwise.var.test

2022-10-30 Thread Jim Lemon
-1.3,2.5,-0.7,c("NA","NS","<0.05","<0.01"), rect.col=c(NA,"red","orange","green")) Jim On Mon, Oct 31, 2022 at 6:34 AM Thomas Subia via R-help wrote: > > Colleagues, > > The RVAideMemoire package has a pairw

Re: [R] Forestplot, grid graphics Viewplot grid.arange

2022-10-13 Thread Jim Lemon
Hi Mary, I didn't see any answers to your post, but doing something like this is quite easy in base graphics. If you are still stuck, I may be able to suggest something. Jim On Mon, Oct 10, 2022 at 6:05 PM Putt, Mary wrote: > > > I have created several plots using the forestplot p

Re: [R] cat in a subroutine

2022-10-13 Thread Jim Lemon
Have you assigned the valuie of goprobit1.r.me.kr to "fortytwo", or indeed anything? Jim On Thu, Oct 13, 2022 at 8:02 PM Steven T. Yen wrote: > > Not really. > > fortytwo<-42 > cat("\nMarginal and Discrete Effects of Gen Ordered Logit / Probit > Probabilities

Re: [R] cat in a subroutine

2022-10-13 Thread Jim Lemon
of Gen Ordered Logit / Probit Probabilities logisitic = 42 If I don't define fortytwo before calling cat, it doesn't. So we know what the answer is. Jim On Thu, Oct 13, 2022 at 7:36 PM Steven Yen wrote: > > t<-abs(me)/se; p<-2*(1-pt(t,nrow(x))) > sig<-my.sig.levels(p

Re: [R] cat in a subroutine

2022-10-13 Thread Jim Lemon
tic" in the stats package, but that shouldn't be visible due to the capital L Jim On Thu, Oct 13, 2022 at 6:55 PM Steven T. Yen wrote: > > Thanks Erin. > > No. Removing the second line (so that cat simply prints something else), > > cat("\nMarginal and Discrete Effects

Re: [R] Ids with matching number combinations?

2022-10-08 Thread Jim Lemon
through the data frame for(i in df[,1]) result[i,]<-match_all_a(df2[i,],df[i,],i) # display the result id, row in df, whether matched result # select the rows of result for which matched is TRUE Jim On Fri, Oct 7, 2022 at 11:57 PM Marine Andersson wrote: > > Hi, > > If I have two

Re: [R] Creating a year-month indicator and groupby with category

2022-10-03 Thread Jim Lemon
t;), class = c("spec_tbl_df", "tbl_df", "tbl", "data.frame")) # convert year and month fields to dates about the middle of each month dat$date<-as.Date(paste(dat$year,dat$month,15,sep="-"),"%Y-%m-%d") # plot the values for one company plo

Re: [R] Converting a Date variable from character to Date

2022-09-29 Thread jim holtman
.Period CPI. date ## 1 2022m1 4994 2022-01-01 ## 2 2022m2 5336 2022-02-01 ## 3 2022m3 5671 2022-03-01 ## 4 2022m4 6532 2022-04-01 ## 5 2022m5 7973 2022-05-01 ## 6 2022m6 10365 2022-06-01 ## 7 2022m7 12673 2022-07-01 ## 8 2022m8 14356 2022-08-0

Re: [R] How long does it take to learn the R programming language?

2022-09-29 Thread jim holtman
Still at it after 38 years. First came across S at Bell Labs in 1984. Thanks Jim Holtman *Data Munger Guru* *What is the problem that you are trying to solve?Tell me what you want to do, not how you want to do it.* On Thu, Sep 29, 2022 at 7:09 AM Ebert,Timothy Aaron wrote: > Learnin

Re: [R] How long does it take to learn the R programming language?

2022-09-28 Thread Jim Lemon
Given some of the questions that are posted to this list, I am not sure that there is an upper bound to the estimate. Jim __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Converting Character date to Dates in r

2022-09-28 Thread Jim Lemon
f the original strings, someone can answer your question. Jim On Thu, Sep 29, 2022 at 4:02 AM Admire Tarisirayi Chirume wrote: > > Hello, i hope this email finds you well. Kindly help me to format dates > shown as character to dates using as.Dates. > > Attached herewith is my data

Re: [R] Need help plotting

2022-09-23 Thread Jim Lemon
Hi David, No, read.table converts a text representation of data into a data frame object. Jim On Sat, Sep 24, 2022 at 2:29 AM DFP wrote: > > Do I need that read.table if the tst dataframe already exists in my > system? I

Re: [R] Write text file in Fortran format

2022-09-21 Thread Jim Lemon
Sorry, line 9 should be: if(substr(air[airline],1,1) == " ") Jim On Thu, Sep 22, 2022 at 8:51 AM Jim Lemon wrote: > > Hi Javad, > The example text file you sent doesn't appear to have the two > "trailer" lines that you describe. I would try this brute forc

Re: [R] Write text file in Fortran format

2022-09-21 Thread Jim Lemon
its=5,width=widthcol3,format="f"), substr(inputline,endcol3+1,lenline)) } writeLines(air,"Air2.txt") Jim On Wed, Sep 21, 2022 at 9:25 PM javad bayat wrote: > > Dear Jim; > I have no knowledge of the FORTRAN language. The text file is a model's > output file a

Re: [R] Write text file in Fortran format

2022-09-21 Thread Jim Lemon
fixed format. You will have to define the variable names in your FORTRAN code and work out the input format specifications for the fields. Jim On Wed, Sep 21, 2022 at 8:30 PM Ebert,Timothy Aaron wrote: > > This post was empty. > > Tim > > From: R-help On Behalf Of javad bayat

Re: [R] Need help plotting

2022-09-20 Thread Jim Lemon
ch=19,col=c("red","blue")) dev.off() If you have more than one day, it will show up on the x axis. You can also format the tick labels if you want the full dates for only one day. Jim PS thanks Avi On Tue, Sep 20, 2022 at 4:49 PM Parkhurst, David wrote: > > Thank you.

Re: [R] Need help plotting

2022-09-19 Thread Jim Lemon
Hi David, All I got was the rather cryptic "DFP (iPad)" below your message. Whatever format you used for the data was blocked by the R-help mail server. Try this command in your R session: dput(test) and cut and paste the output into your email. That should do it. Jim On Tue, Sep 20,

Re: [R] Need help plotting

2022-09-19 Thread Jim Lemon
Hi David, Since you used read.csv to get the data frame, the file must be i text format. If you can include a few lines of the input (with made up NO2 values if necessary), it would be easy to respond with the required commands and a plot. Jim On Mon, Sep 19, 2022 at 9:12 PM Parkhurst, David

Re: [R] Overlapping barplots and lines

2022-09-15 Thread Jim Lemon
Hi Stefano, The bar x centers are returned by the barplot function. You can also use the barp function (plotrix package) that places the bars at unit intervals by default. Jim On Thu, Sep 15, 2022 at 3:47 PM Stefano Sofia wrote: > > Dear R-list users, > > I have a silly problem with

Re: [R] Clustering of datasets

2022-09-05 Thread Jim Lemon
m=c(1,46)) text(1:46,DMs[,2],DMs[,1],col=k2$cluster) points(rep(23,2),k2$centers,pch=1:2,cex=2,col=k2$cluster) legend(10,1,c("cluster 1: Highly Integrated","cluster 2: Less Integrated"), col=1:2,pch=19) Jim On Mon, Sep 5, 2022 at 9:31 PM Subhamitra Patra wrote: > > Dear a

Re: [R] Getting minimum value of a column according a factor column of a dataframe

2022-08-25 Thread Jim Lemon
nt of the list df1b<-df1a[[1]] # rbind the remaining rows for(i in 2:length(df1a)) df1b<-rbind(df1b,df1a[[i]]) # display the result df1b Jim On Fri, Aug 26, 2022 at 5:25 AM javad bayat wrote: > ... > I think I should explain more about my request. I had a large data frame > (11059 row

Re: [R] Reading a CSV file

2022-08-06 Thread Jim Lemon
HI Erin, Just index out the lines in the result vector. Jim On Sun, Aug 7, 2022 at 10:16 AM Erin Hodgess wrote: > > Hello! > > Is there a way to read the first line of a CSV file, then skip 4 lines, > then continue reading, please? > > I know you can skip from the top, bu

Re: [R] Extract time and state of charge (Start and End) and Count

2022-07-19 Thread Jim Lemon
tried to comment the code so that you an see what I am doing. Jim On Wed, Jul 20, 2022 at 1:18 AM roslinazairimah zakaria wrote: > > Hi Jim, > > I tried to run your code and got this error. > > > # get the temporal order of observations > > obs_order <- order(c(as.

Re: [R] A Request

2022-06-21 Thread Jim Lemon
Hi Chishti, Try this: dim(x)[2] length(dn) >From your error message, the two will be different. They should be the same. A wild guess is that the offending line of code should be: dimnames[2]<-1:dn Jim On Tue, Jun 21, 2022 at 11:10 PM Muhammad Zubair Chishti wrote: > > Hi, De

Re: [R] Query regarding R 'irr' package 'N.cohen.kappa'

2022-06-16 Thread Jim Lemon
differences in the estimates for large N in the different methods of calculation. I cannot advise which would best suit your purpose as I only did testing and refining code in the N2.cohen.kappa function. Perhaps corresponding directly with Matthais Gamer would be your best option. Jim On Fri

Re: [R] Changing sign of columns and values

2022-06-12 Thread Jim Lemon
2 # now swap the XA columns and reflect the # idxx values of the rows in which # EA and OA are different between df1 and df2 # here I have looped through the rows nrows<-dim(dfnew)[1] idcols<-4:8 XAcols<-2:3 for(i in 1:nrows) { if(reversals[i]) { dfnew[i,XAcols]<-rev(dfnew[i,XAc

Re: [R] Changing sign of columns and values

2022-06-11 Thread Jim Lemon
relevant EA values to the old OA values mydf$EA[swap_letters]<-newEA # change the beta values mydf$beta<-abs(mydf$beta) mydf Jim On Sun, Jun 12, 2022 at 9:11 AM hanatezera wrote: > > Dear jim thanks for your help! I want to change also the value of OA and EF > simultaneously

Re: [R] Changing sign of columns and values

2022-06-11 Thread Jim Lemon
1 C A -0.050 22 G A 0.098 33 G T -0.789 # change values of mydf$beta to absolute values mydf$beta<-abs(mydf$beta) mydf IDnumber OA EA beta 11 C A 0.050 22 G A 0.098 3 3 G T 0.789 Jim On Sun, Jun 12, 2022 at 8:27 AM hanatezera wrote

Re: [R] Mixing plotting symbols with text

2022-06-07 Thread Jim Lemon
,adj=adj) par(oldcex) } par(xpd=TRUE) symbol_n_text(0,1.35,3,"your stuff",cex=1.5) symbol_n_text(0,1.2,4,"my stuff",cex=1.5) Thanks for the nod, Bert. Jim On Wed, Jun 8, 2022 at 5:39 AM Erin Hodgess wrote: > > Hello! > > Hope you’re having a great day! > &g

Re: [R] How to represent tree-structured values

2022-05-30 Thread Jim Lemon
Hi Richard, Thinking about this, you might also find intersectDiagram, also in plotrix, to be useful. Jim On Mon, May 30, 2022 at 4:37 PM Jim Lemon wrote: > > Hi Richard, > Some years ago I had a try at illustrating Multiple Causes of Death > (MCoD) data. I settled on what is someti

Re: [R] How to represent tree-structured values

2022-05-29 Thread Jim Lemon
Hi Richard, Some years ago I had a try at illustrating Multiple Causes of Death (MCoD) data. I settled on what is sometimes called a "sizetree". You can see some examples in the sizetree function help page in "plotrix". Unfortunately I can't use the original data as it w

Re: [R] How to color boxplots with respect to the variable names

2022-05-29 Thread Jim Lemon
OO, Ranger_boot, SVM, SVM_LOO, SVM_boot, KNN, KNN_LOO, KNN_boot, range = 0, col=colors, names= c("RF", "RF_LOO", "RF_boot", "Ranger", "Ranger_LOO", "Ranger_boot", "SVM", "SVM_LOO", "SVM_boot",

Re: [R] Help for funnel plot

2022-05-15 Thread Jim Lemon
ave a good idea of how that left-to-right gradient is determined. Perhaps: w...@metafor-project.org could tell you. Jim On Sun, May 15, 2022 at 10:24 PM De Simone wrote: > > Thank you Jim > I attached an example for color gradient > What would be the argument for one color gradient.

Re: [R] Help for funnel plot

2022-05-15 Thread Jim Lemon
arguments in your plotting function. Jim On Sun, May 15, 2022 at 3:48 PM De Simone wrote: > > Hi, > Excuse me for this silly question > how do I get a colour gradient like the one attached. Colours are a bit > limited > Any specific code for the reference line and pseudo confidence l

Re: [R] Filtering an Entire Dataset based on Several Conditions

2022-05-09 Thread Jim Lemon
831 NA 4.032902 -4.343869 4 NA NA NANA Beware that this behavior of data frames may not persist in the future. You may have to convert to a matrix and then convert the result back again. Jim On Mon, May 9, 2022 at 6:24 PM Paul Bernal wrote: > > Dear friends, >

Re: [R] R Code Execution taking forever

2022-04-23 Thread Jim Lemon
have planned to insert code to only retain the largest maximum to fix this. If I get to it, I'll post the result. Jim On Sun, Apr 24, 2022 at 11:01 AM Paul Bernal wrote: > > Dear R friends, > > Hope you are doing great. The reason why I am contacting you all, is > because t

Re: [R] Error with text analysis data

2022-04-12 Thread Jim Lemon
y get something with stringsAsFactors=TRUE, but I don't know whether it will be sensibler. Jim On Wed, Apr 13, 2022 at 8:12 AM Neha gupta wrote: > > Hello everyone, I have text data with output variable have three subgroups. > I am using the following code but getting the error message (

Re: [R] replacing a value

2022-04-05 Thread Jim Lemon
it up when printing the result. How do you know that it failed? Jim On Wed, Apr 6, 2022 at 12:48 PM ani jaya wrote: > > Dear R-Help, > > I try to change a specific value here by following these: > > https://www.journaldev.com/39695/replace-in-r > https://stackoverflow.com/qu

Re: [R] Plotting proportions

2022-04-03 Thread Jim Lemon
Hi Nick, If you can bear using R base graphics, the plotrix package has a function named "getYmult" that allows you to adjust for the aspect ratio of any plot area. Jim On Sun, Apr 3, 2022 at 11:14 PM Nick Wray wrote: > > Hello If you plot a square in the default R studio

Re: [R] Cook's distance for least absolute deviation (lad) regressions

2022-03-20 Thread Jim Lemon
or not, I think you can still use the "cookd" alias. Jim On Mon, Mar 21, 2022 at 11:57 AM Kelly Thompson wrote: > > I'm wanting to calculate Cook's distance for least absolute deviation > (lad) regressions. > > Which R packages and functions offer this? >

Re: [R] setting zeros for missing interval in data

2022-02-28 Thread Jim Lemon
na(newyy$RAINFALL)]<-0 plot(newyy$datetime,newyy$RAINFALL) Jim On Tue, Mar 1, 2022 at 2:57 PM Eliza Botto wrote: > > [The data setting in the last email might be faulty] > > Dear useRs, > > I have the following dataset which represents rainfall data at a 5-minute > interval

Re: [R] tidying up

2022-02-27 Thread Jim Lemon
most responses just give them a typing exercise. Jim On Mon, Feb 28, 2022 at 6:35 AM Avi Gross via R-help wrote: > > This mailing list seems to steadily get messages that some see as not > relevant to this forum. In particular, some see it as wrong to bring up some > things here a

Re: [R] Plot by month

2022-02-27 Thread Jim Lemon
by month plot(months,temp_x_month,main="Mean temperature by month") You may only need to apply the last three steps to your data. Jim On Sun, Feb 27, 2022 at 1:07 AM Ebert,Timothy Aaron wrote: > > I did not get the data but I was wondering what you have already tried. >

Re: [R] saving png images and X11

2022-02-26 Thread Jim Lemon
Hi Bogdan, If we take the error message seriously, it may be that the initial X11 image was never displayed. When this very suspicious black box function tried to transfer the image to a PNG file, it wasn't there or the function couldn't find it. Jim On Sun, Feb 27, 2022 at 2:51 AM Bog

Re: [R] Survey design for multilevel analysis

2022-02-01 Thread Jim Lemon
the: R-SGI-Epi mailing list you will get responses from specialists in the field. Jim On Tue, Feb 1, 2022 at 9:02 PM Love Umesi wrote: > > I am new in using R, and I need to run a multilevel analysis (two-phase > design on two levels) using Cox frailty survival model on a survey data &

Re: [R] How to avoid a divide by zero issue.

2022-01-25 Thread Jim Lemon
number to all denominator values if that would still give useful output. Jim On Wed, Jan 26, 2022 at 7:51 AM Neha gupta wrote: > > Hello everyone > > I have an output variable (0/1) and I want to evaluate how the model is > biased when we have 1 and when 0 value. > > The pro

Re: [R] NAs are removed

2022-01-14 Thread Jim Lemon
Hi Neha, You're using the argument "na.omit" in what function? My blind guess is that there's a divide by zero shooting you from behind. Jim On Sat, Jan 15, 2022 at 6:32 AM Neha gupta wrote: > > Hi everyone > > I use na.omit to remove NAs but still it gives me

Re: [R] (Off-Topic) Time for a companion mailing list for R packages?

2022-01-13 Thread Jim Lemon
ood memory and I still blush at some of the stupid questions I have asked. Jim On Fri, Jan 14, 2022 at 7:09 AM Marc Schwartz via R-help wrote: > > Eric, > > With respect to your second point, as one of the moderators for the > R-Devel list, where the same considerations apply to a

Re: [R] Method Guidance

2022-01-11 Thread Jim Lemon
ot;Day",ylab="",main="The As and the Bs", pch=c(" ","A")[jrdf$Event_A+1],yaxt="n") points(jrdf$Time+jrdf$Lag_B+0.2,jrdf$Event_B,pch=c(" ","B")[jrdf$Event_B+1]) Jim On Wed, Jan 12, 2022 at 1:33 PM Jeff Newmiller wrote:

Re: [R] unexpected (?) behavior of box()

2022-01-07 Thread Jim Lemon
Yes, the Mercator projection unwraps the globe (360 degrees around) while the poles are 180 degrees apart. It then stretches the result into a rectangle. If you enter: par("usr") after drawing the world map you will see the proportions. Jim On Fri, Jan 7, 2022 at 7:20 PM ani j

Re: [R] unexpected (?) behavior of box()

2022-01-06 Thread Jim Lemon
Hi Ani, Blame Mercator. Maps draws an approximately 2x1 plot. Maybe this: mappar<-par("usr") rect(mappar[1],mappar[3],mappar[2],mappar[4]) Jim On Fri, Jan 7, 2022 at 6:25 PM ani jaya wrote: > > Dear R expert, > > I try to box a figure using box(). However it box the

Re: [R] Dependencies for building R

2022-01-06 Thread Jim Lemon
Thanks, Bert. I will. Jim On Fri, Jan 7, 2022 at 3:44 PM Bert Gunter wrote: > > Ask on r-sig-fedora rather than here, no? > > On Thu, Jan 6, 2022, 8:18 PM Jim Lemon wrote: >> >> Hi, >> I'm facing the usual challenge of building the latest release of R on

[R] Dependencies for building R

2022-01-06 Thread Jim Lemon
just been reading Installation and Administration in the manual and haven't found anything like this. Any pointers appreciated. Jim __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLE

Re: [R] Mapping of groups of countries

2022-01-02 Thread Jim Lemon
Hi George, Same to you. I fooled around with the plot a bit after I sent the email. Jim On Mon, Jan 3, 2022 at 8:36 AM george brida wrote: > > Thanks a lot Jim. I really appreciate your help. Happy new year 2022. > George > > On Wed, Dec 29, 2021 at 10:10 PM Jim Lemon wrote:

Re: [R] Mapping of groups of countries

2021-12-29 Thread Jim Lemon
"India","Mexico","Turkey") countrycol<-c(rep("red",6),rep("blue",4),"green",rep("orange",3)) for(i in 1:length(countries)) { mapinf<-map(region=countries[i],col=countrycol[i],add=TRUE) xpos<-sum(mapinf$range[1:2])/2 ypos<

Re: [R] able to estimate in the excel but not in R, any suggestion?

2021-12-23 Thread jim holtman
Glad to help! Happy Holidays Thanks Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it. On Wed, Dec 22, 2021 at 11:12 PM Marna Wagley wrote: > > Dear Jim, > Thank you very much for the help. The code

Re: [R] able to estimate in the excel but not in R, any suggestion?

2021-12-22 Thread jim holtman
2 0.682 51.284 69.985 52.46340 3 0.741 51.249 75.914 56.96310 4 0.394 51.200 40.303 30.25918 5 0.200 51.137 20.493 15.34110 6 0.655 51.059 66.905 50.16535 7 0.375 50.968 38.185 28.66948 > Thanks Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what yo

Re: [R] for loop question in R

2021-12-22 Thread jim holtman
%>%filter(hwy <35) %>% print(ggplot(aes(x = displ, y = y[i], color = c[i])) + geom_point()) ggsave("c:/temp/f[i].jpg",width = 9, height = 6, dpi = 1200, units = "in") } Thanks Jim Holtman Data Munger Guru What is the problem that you are trying to sol

Re: [R] Creating NA equivalent

2021-12-21 Thread Jim Lemon
rt from perhaps "non-zero", an over limit value gives something like censoring with "at least this much". However, it is more difficult to conceptualize and I suspect, to quantify. To me, the important information is that we think there _may be_ a value but we don't (yet?) kno

Re: [R] Creating NA equivalent

2021-12-21 Thread Jim Lemon
seems to me that an appropriate designation for the value is Unk, perhaps with an associated probability of determination to distinguish it from NA (it is definitely not known). Jim On Wed, Dec 22, 2021 at 6:55 AM Avi Gross via R-help wrote: > > I wonder if the package Adrian Dușa created

Re: [R] help with LDA topic modelling..

2021-12-20 Thread Jim Lemon
matter how devout the adherents, I don't think you would find news articles that only mentioned one of these festivals. Less facetious groupings would suffer the same eclectic problem. Jim On Mon, Dec 20, 2021 at 6:29 PM akshay kulkarni wrote: > > dear members, >

Re: [R] CandlestickCharts of any listed stock and fetching stock prices into R

2021-12-18 Thread Jim Lemon
u a bit further. Also it's obvious that the function wants character dates with quotes around them. There seem to be quite a few YouTube tutorials on candlestick charts. Jim On Sun, Dec 19, 2021 at 1:15 AM Winod Dhamnekar wrote: > > Hello, > R users community, > I want to plot ca

Re: [R] Changing time intervals in data set

2021-12-15 Thread Jim Lemon
no measurements were taken or perhaps they were lost. Jim On Thu, Dec 16, 2021 at 8:13 AM Rich Shepard wrote: > > On Wed, 15 Dec 2021, jim holtman wrote: > > > At least show a sample of the data and then what you would like as output. > > Jim, > > There are 813,694 rows of da

Re: [R] Changing time intervals in data set

2021-12-15 Thread jim holtman
At least show a sample of the data and then what you would like as output. Thanks Jim Holtman *Data Munger Guru* *What is the problem that you are trying to solve?Tell me what you want to do, not how you want to do it.* On Wed, Dec 15, 2021 at 6:40 AM Rich Shepard wrote: > A 33-year set

  1   2   3   4   5   6   7   8   9   10   >