Re: [R] Query concerning working directory for file.choose()

2024-12-19 Thread J C Nash
Thanks Duncan. The behaviour is tricky, and I'm still not sure I can predict it. Indeed, I spent about an hour fiddling with file.choose(). It allows navigation across directories, so is not totally without value. However, I've noticed users are very prone to making errors when they aren't in t

Re: [R] Query concerning working directory for file.choose()

2024-12-19 Thread peter dalgaard
Yes, this is different in RStudio, e.g. I had actually forgotten how brain-dead the CLI version is: > file.choose() Enter file name: (Given that install.packages() fires up a Tcl/Tk chooser, users might reasonably expect us to do something at least slightly smarter). - Peter > On 18 Dec 2024

Re: [R] Query concerning working directory for file.choose()

2024-12-18 Thread Duncan Murdoch
I believe file.choose() remembers the last choice, and repeats that location the next time you call it. This is true when it is called at top level or from within a function. The first time you call it in a session, it will default to the current working directory, but not after that. Front

Re: [R] Query concerning working directory for file.choose()

2024-12-18 Thread Bert Gunter
choose.files is only for MS Windows (the Help file says). -- Bert On Wed, Dec 18, 2024 at 8:06 AM Gabor Grothendieck wrote: > > Try choose.files > > choose.files(default = file.path(mydir, "*.*"), multi = FALSE) > > On Wed, Dec 18, 2024 at 10:33 AM J C Nash wrote: > > > > I've been working

Re: [R] Query concerning working directory for file.choose()

2024-12-18 Thread Gabor Grothendieck
P.S. That assumes Windows. On Wed, Dec 18, 2024 at 11:02 AM Gabor Grothendieck wrote: > > Try choose.files > > choose.files(default = file.path(mydir, "*.*"), multi = FALSE) > > On Wed, Dec 18, 2024 at 10:33 AM J C Nash wrote: > > > > I've been working on a small personal project that needs

Re: [R] Query concerning working directory for file.choose()

2024-12-18 Thread Gabor Grothendieck
Try choose.files choose.files(default = file.path(mydir, "*.*"), multi = FALSE) On Wed, Dec 18, 2024 at 10:33 AM J C Nash wrote: > > I've been working on a small personal project that needs to select files for > manipulation from > various directories and move them around in planned ways. f

Re: [R] Query on finding root

2023-08-28 Thread Ben Bolker
(I mean pdavies) On Mon, Aug 28, 2023, 7:52 AM Ben Bolker wrote: > I would probably use the built in qdavies() function... > > On Mon, Aug 28, 2023, 7:48 AM Leonard Mada via R-help < > r-help@r-project.org> wrote: > >> Dear R-Users, >> >> Just out of curiosity: >> Which of the 2 methods is the b

Re: [R] Query on finding root

2023-08-28 Thread Ben Bolker
I would probably use the built in qdavies() function... On Mon, Aug 28, 2023, 7:48 AM Leonard Mada via R-help wrote: > Dear R-Users, > > Just out of curiosity: > Which of the 2 methods is the better one? > > The results seem to differ slightly. > > > fun = function(u){((26104.50*u^0.03399381)/((

Re: [R] Query on finding root

2023-08-28 Thread Leonard Mada via R-help
Dear R-Users, Just out of curiosity: Which of the 2 methods is the better one? The results seem to differ slightly. fun = function(u){((26104.50*u^0.03399381)/((1-u)^0.107)) - 28353.7} uniroot(fun, c(0,1)) # 0.6048184 curve(fun(x), 0, 1) abline(v=0.3952365, col="red") abline(v=0.6048184,

Re: [R] Query on finding root

2023-08-27 Thread Ben Bolker
This doesn't look like homework to me -- too specific. The posting guide says that the list is not intended for "Basic statistics and classroom homework" -- again, this doesn't seem to fall into that category. tl;dr, I think the difference b

Re: [R] Query on finding root

2023-08-27 Thread Rolf Turner
On Fri, 25 Aug 2023 22:17:05 +0530 ASHLIN VARKEY wrote: > Sir, Please note that r-help is a mailing list, not a knight! 😊️ > I want to solve the equation Q(u)=mean, where Q(u) represents the > quantile function. Here my Q(u)=(c*u^lamda1)/((1-u)^lamda2), which is > the quantile function of Dav

Re: [R] Query on finding root

2023-08-26 Thread J C Nash
Homework? On 2023-08-25 12:47, ASHLIN VARKEY wrote: Sir, I want to solve the equation Q(u)=mean, where Q(u) represents the quantile function. Here my Q(u)=(c*u^lamda1)/((1-u)^lamda2), which is the quantile function of Davies (Power-pareto) distribution. Hence I want to solve , *(c*u^lamda1)/((1

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 reference,I want to

Re: [R] Query about code

2023-04-21 Thread Bert Gunter
"Perhaps you could supply a reference to the work you are using?" ... in which case they should simply email the author directly, no? -- Bert On Fri, Apr 21, 2023 at 3:22 PM Jim Lemon wrote: > > Hi Yeswanth, > You seem to be referring to a specific publication by a specific > author. Unless som

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 NA

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: > S

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

2022-06-16 Thread Jim Lemon
Hi Kalaivani, The N.cohen.kappa function was written by Matthais Gamer, the maintainer of the irr package. Both that function and N2.cohen.kappa (written by Puspendra Singh) involve corrections that are described in the references on the respective help pages. It is likely that there will be small

Re: [R] Query regarding stats/p.adjust package (base) - specifically 'Hochberg' function

2021-08-24 Thread Jim Lemon
This is beginning to sound like a stats taliban fatwa. I don't care if you're using an abacus, you want to get the correct result. My guess is that the different instantiations of the Hochberg adjustment are using different algorithms to calculate the result. The Hochberg adjustment is known to be

Re: [R] Query regarding stats/p.adjust package (base) - specifically 'Hochberg' function

2021-08-24 Thread Rolf Turner
On Tue, 24 Aug 2021 14:44:55 + David Swanepoel wrote: > Dear R Core Dev Team, I hope all is well your side! > My apologies if this is not the correct point of contact to use to > address this. If not, kindly advise or forward my request to the > relevant team/persons. > > I have a query re

Re: [R] Query regarding stats/p.adjust package (base) - specifically 'Hochberg' function

2021-08-24 Thread David Swanepoel
bject: Re: [R] Query regarding stats/p.adjust package (base) - specifically 'Hochberg' function 1. No Excel attachments made it through. Binary attachments are generally stripped by the list server for security reasons. 2. As you may have already learned, this is the wrong forum fo

Re: [R] Query regarding stats/p.adjust package (base) - specifically 'Hochberg' function

2021-08-24 Thread Martin Maechler
> Bert Gunter > on Tue, 24 Aug 2021 10:50:50 -0700 writes: > 1. No Excel attachments made it through. Binary > attachments are generally stripped by the list server for > security reasons. > 2. As you may have already learned, this is the wrong > forum for statist

Re: [R] Query regarding stats/p.adjust package (base) - specifically 'Hochberg' function

2021-08-24 Thread Bert Gunter
1. No Excel attachments made it through. Binary attachments are generally stripped by the list server for security reasons. 2. As you may have already learned, this is the wrong forum for statistics or package specific questions. Read *and follow* the posting guide linked below to post on r-help a

Re: [R] Query

2021-04-26 Thread Rui Barradas
tact the maintainer("vars") ? Hope this helps, Rui Barradas Às 18:31 de 25/04/21, Sun Yong Kim escreveu: vars package From: John Kane Sent: Sunday, April 25, 2021 12:30 PM To: Sun Yong Kim Cc: r-help@r-project.org Subject: Re: [R] Query What package

Re: [R] Query

2021-04-26 Thread Jim Lemon
n Kane > Sent: Sunday, April 25, 2021 12:30 PM > To: Sun Yong Kim > Cc: r-help@r-project.org > Subject: Re: [R] Query > > What package has the irf function? > > On Fri, 23 Apr 2021 at 09:34, Sun Yong Kim > wrote: > > > > Hi > > > > I have been trying

Re: [R] Query

2021-04-26 Thread Sun Yong Kim
vars package From: John Kane Sent: Sunday, April 25, 2021 12:30 PM To: Sun Yong Kim Cc: r-help@r-project.org Subject: Re: [R] Query What package has the irf function? On Fri, 23 Apr 2021 at 09:34, Sun Yong Kim wrote: > > Hi > > I have been trying

Re: [R] Query

2021-04-25 Thread John Kane
What package has the irf function? On Fri, 23 Apr 2021 at 09:34, Sun Yong Kim wrote: > > Hi > > I have been trying to circulate a question but my question keeps getting > rejected. Let me try again via email. The message is below: > > I am trying to change the tick size for IRF graphs that I cre

Re: [R] Query on constrained regressions using -mgcv- and -pcls-

2020-11-02 Thread Bert Gunter
Warning: I did *not* attempt to follow your query(original or addendum) in detail. But as you have not yet received a reply, it may be because your post seems mostly about statistical issues, which are generally off topic here. This list is primarily about R programming issues. If statistical issue

Re: [R] Query on constrained regressions using -mgcv- and -pcls-

2020-11-02 Thread Clive Nicholas via R-help
As an addendum / erratum to my original post, the second block of code should read for completeness: set.seed(02102020) N=500 M=10 rater=rep(1:M, each = N) lead_n=as.factor(rep(1:N,M)) a=rep(rnorm(N),M) z=rep(round(25+2*rnorm(N)+.2*a)) x=a+rnorm(N*M) y=.5*x+5*a-.5*z+2*rnorm(N*M) x_cl=rep(aggregate

Re: [R] Query on contour plots

2020-06-02 Thread Abby Spurdle
> The contour lines are actually useful to see groupings. > However w/o a legend for density it is not possible to see what is > presented. I need to re-iterate, that the diagonal lines, may be important. Also, I'm not sure I see the point in adding density values. Unless people have a good knowl

Re: [R] Query on contour plots

2020-06-02 Thread Abby Spurdle
> that extraneous white lines in PDFs are the fault of the PDF > viewing program rather than of R. Except it's a PNG file. I've tried to minimize artifacts viewing PDF files. But assumed (falsely?) that PNGs and other raster formats, would be fine. __

Re: [R] Query on contour plots

2020-06-02 Thread Neotropical bat risk assessments
Tnx Jim, Yes if there is a way to first extract the ranges of each data files Fc range and Sc ranges and then link to the plot that would be stellar. I will look at this code and see how it is working so far. Thanks a million. Bruce Hi Bruce & Abby, Here is a start on merging the two plots. A

Re: [R] Query on contour plots

2020-06-02 Thread David Winsemius
On 6/2/20 11:44 AM, Abby Spurdle wrote: Very nice Jim, thank you. However, the (deterministic, or near-deterministic) diagonal lines in the plot, make me question the suitability of this approach. In my plot, the contour lines could be removed, and brighter colors could be used. But perhaps,

Re: [R] Query on contour plots

2020-06-02 Thread Jim Lemon
Hi Bruce & Abby, Here is a start on merging the two plots. Abby - I had to cheat on the legend colors as I could not work out from the help pages how to specify the range of colors. Also I don't know the range of densities. Both should be easy to fix. While I specified xlab and ylab, they don't see

Re: [R] Query on contour plots

2020-06-02 Thread Neotropical bat risk assessments
Hi Abby, The contour lines are actually useful to see groupings. However w/o a legend for density it is not possible to see what is presented. Very nice Jim, thank you. However, the (deterministic, or near-deterministic) diagonal lines in the plot, make me question the suitability of this appr

Re: [R] Query on contour plots

2020-06-02 Thread Abby Spurdle
> Very nice Jim, thank you. However, the (deterministic, or near-deterministic) diagonal lines in the plot, make me question the suitability of this approach. In my plot, the contour lines could be removed, and brighter colors could be used. But perhaps, a better approach would be to model those

Re: [R] Query on contour plots

2020-06-02 Thread Neotropical bat risk assessments
Hi all, I spent some time this morning fiddling with the parameters in the plot code provided by Jim and Abby and  by changing some important ones. Jim did note *# set the matrix limits a bit beyond the data ranges* fcsc_mat<-makeDensityMatrix(bfs$Fc,bfs$Sc,nx=100,ny=100,  zfun="sum",xlim=c(*30

Re: [R] Query on contour plots

2020-06-02 Thread Neotropical bat risk assessments
Hi all, Many thanks for the efforts and suggestions. This is getting closer to what is needed.  No legend showing the density values yet. I was able to replicate a similar plot with the original data set. However when I tried this with a different data set that has other Fc & Sc values  the plo

Re: [R] Query on contour plots

2020-06-02 Thread Jim Lemon
Very nice. I forgot that you didn't have the complete data set. png("as_bat_call.png") plot_ds (bfs[,c("Fc","Sc")], "plot 1", xlim = c (25, 30), ylim = c (-15, 10), k1=1.25, k2=1.25) dev.off() Jim On Tue, Jun 2, 2020 at 6:24 PM Abby Spurdle wrote: > > I'm putting this back on the list.

Re: [R] Query on contour plots

2020-06-02 Thread Abby Spurdle
I'm putting this back on the list. > So how would I set up the code to do this with the data type I have? > I will need to replicate the same task > 200 times with other data sets. > What I need to do is plot *Fc *against *Sc* with the third dimension being > the *density* of the data points. U

Re: [R] Query on contour plots

2020-06-01 Thread Jim Lemon
Good morning Bruce & Abby, The fruit bats of Sydney have retreated to their camps so I can finally answer your last two queries. Attached is a plot of your data set on a 100 x 100 grid. This is how I did it: bfs<-read.csv("Procen_sample.csv") dim(bfs) names(bfs) library(plotrix) # set the matrix l

Re: [R] Query on contour plots

2020-06-01 Thread Abby Spurdle
Hi, I'm probably biased. But my package, bivariate, contains a wrapper for KernSmooth::bkde2D, which can produce both 3D surface plots and (pretty) contour plots of bivariate kernel density estimates, conveniently. https://cran.r-project.org/web/packages/bivariate/vignettes/bivariate.pdf (pages

Re: [R] Query on contour plots

2020-05-31 Thread Jim Lemon
Hi Bruce, With a much larger data set, you would see a smoother plot like your sample. I plotted frequency as the abcissa and slope as the ordinate. It looks as though your sample has it the other way round and the plot limits are extended beyond the range of the data. However, makeDensityMatrix an

Re: [R] Query on contour plots

2020-05-31 Thread Jim Lemon
Hi Neo, It's a bit of a guess, but try this: bat_call<-read.table(text="Fc Sc 26.58 -5.95 27.03 -8.2 27.16 -2.07 26.19 -7.68 26.62 -3.99 26.85 -6.08 26.94 0 26.1-5.74 26.62 -5.96 26.85 -4.05 26.98 -4.09 26.02 -5.69 26.53 -7.89 26.62 -2 26.8-4.04 28.73 7 25.

Re: [R] Query on 3d plotting pacakges

2020-05-31 Thread Bert Gunter
1. Search 2. Search! 3. Search!! "3D plotting" at rseek.org (or R 3-d plotting on google) CRAN plotting task view: https://CRAN.R-project.org/view=Graphics ... and you don't even necessarily need 3D plotting if you encode the density with color à la heatmaps. Bert Gunter "The trouble with havi

Re: [R] Query about calculating the monthly average of daily data columns

2019-10-20 Thread Jim Lemon
Hi Subhamitra, This is not the only way to do this, but if you only want the monthly averages, it is simple: # I had to change the "soft" tabs in your email to commas # in order to read the data in spdf<-read.table(text="PERMNO,DATE,Spread 111,19940103,0.025464308 111,19940104,0.064424296 111,1994

Re: [R] Query about calculating the monthly average of daily data columns

2019-10-20 Thread Rui Barradas
ross your head, you could continue your way. Cheers Petr -Original Message- From: R-help <mailto:r-help-boun...@r-project.org> On Behalf Of Subhamitra Patra Sent: Friday, September 13, 2019 3:20 PM To: Jim Lemon <mailto:drjimle...@gmail.com>; r-help mailing list http://proj

Re: [R] Query about calculating the monthly average of daily data columns

2019-10-20 Thread jim holtman
1035284691, 8.6464271477849, 10.3412351841865, 10.7577574534162, > > 11.1124067479261, 9.91627943243343, 10.6356898895291, 10.2107566441478, > > 10.0672734202575, 10.2385787014999, 11.7112606160069, 10.0453801263575, > > 8.84654136100724, 10.2173421609193, 9.27919801705716, 10.4755

Re: [R] Query about calculating the monthly average of daily data columns

2019-10-20 Thread Subhamitra Patra
66, 10.5220100705827, 8.74921668696853, > 8.56415116683662, 12.1348451793815, 10.9496674323819, 9.64443817181322, > 9.52977454697087, 10.4281877186725, 8.52701721410292, 11.6911584965782, > 10.2300108250139, 8.65368821276485, 11.7733431942379, 10.2060233777681, > 9.57291673029552, 9.8268

Re: [R] Query about calculating the monthly average of daily data columns

2019-09-16 Thread PIKAL Petr
5, 9.35132038807071, 11.3286703149903, 10.4621597293933, 10.4099459919071, 8.86246315190942, 9.30054044639769, 9.40346575227191, 9.59278722974697)), row.names = c(NA, -260L), class = "data.frame") From: Subhamitra Patra <mailto:subhamitra.pa...@gmail.com> Sent: Friday, September 13, 2019 3:5

Re: [R] Query about calculating the monthly average of daily data columns

2019-09-13 Thread Jim Lemon
Sorry, forgot to include the list. On Sat, Sep 14, 2019 at 10:27 AM Jim Lemon wrote: > > See inline > > On Fri, Sep 13, 2019 at 11:20 PM Subhamitra Patra > wrote: >> >> Dear Sir, >> >> Yes, I understood the logic. But, still, I have a few queries that I >> mentioned below your answers. >> >>>

Re: [R] Query about calculating the monthly average of daily data columns

2019-09-13 Thread Subhamitra Patra
(value column, list(format(date column, "%m.%Y"), country > column), mean) > > But if you insist to scratch your left ear with right hand accross your > head, you could continue your way. > > Cheers > Petr > > > -----Original Message- > > From: R-help On

Re: [R] Query about calculating the monthly average of daily data columns

2019-09-13 Thread PIKAL Petr
From: R-help On Behalf Of Subhamitra > Patra > Sent: Friday, September 13, 2019 3:20 PM > To: Jim Lemon ; r-help mailing list project.org> > Subject: Re: [R] Query about calculating the monthly average of daily data > columns > > Dear Sir, > > Yes, I understood the

Re: [R] Query about calculating the monthly average of daily data columns

2019-09-13 Thread Subhamitra Patra
Dear Sir, Yes, I understood the logic. But, still, I have a few queries that I mentioned below your answers. "# if you only have to get the monthly averages, it can be done this way > spdat$month<-sapply(strsplit(spdat$dates,"-"),"["*,2*) > spdat$year<-sapply(strsplit(spdat$dates,"-"),"[",*3*)" >

Re: [R] Query about calculating the monthly average of daily data columns

2019-09-13 Thread Jim Lemon
Hi Subhamitra, I'll try to write my answers adjacent to your questions below. On Fri, Sep 13, 2019 at 6:08 PM Subhamitra Patra wrote: > Dear Sir, > > Thank you very much for your suggestion. > > Yes, your suggested code worked. But, actually, I have data from 3rd > January 1994 to 3rd August 201

Re: [R] Query about calculating the monthly average of daily data columns

2019-09-13 Thread PIKAL Petr
returnB 24.26667 4 02.1994 returnB 30.03571 Cheers Petr > -Original Message- > From: R-help On Behalf Of Subhamitra > Patra > Sent: Friday, September 13, 2019 10:08 AM > To: Jim Lemon > Cc: r-help mailing list > Subject: Re: [R] Query about calculating the monthly

Re: [R] Query about calculating the monthly average of daily data columns

2019-09-13 Thread Subhamitra Patra
Dear Sir, Thank you very much for your suggestion. Yes, your suggested code worked. But, actually, I have data from 3rd January 1994 to 3rd August 2017 for very large (i.e. for 84 countries) sample. From this, I have given the example of the years up to 2000. Before applying the same code for the

Re: [R] Query about calculating the monthly average of daily data columns

2019-09-12 Thread Jim Lemon
Hi Subhamitra, Your data didn't make it through, so I guess the first thing is to guess what it looks like. Here's a try at just January and February of 1994 so that we can see the result on the screen. The logic will work just as well for the whole seven years. # create fake data for the first tw

Re: [R] Query about calculating the monthly average of daily data columns

2019-09-12 Thread Rui Barradas
Hello, Inline. Às 17:33 de 12/09/19, Bert Gunter escreveu: But she wants *monthly* averages, Rui. Thanks, my mistake. Ergo ave() or tidyData equivalent, right? Maybe. But ave() returns as many values as the input length, this seems more suited for tapply or aggregate. I will first cre

Re: [R] Query about calculating the monthly average of daily data columns

2019-09-12 Thread Rui Barradas
Hello, Please include data, say dput(head(data, 20)) # post the output of this But, is the problem as simple as rowMeans(data[2:3], na.rm = TRUE) ? Hope this helps, Rui Barradas Às 15:53 de 12/09/19, Subhamitra Patra escreveu: Dear R-users, I have daily data from 03-01-1994 to 29-12-2

Re: [R] Query about calculating the monthly average of daily data columns

2019-09-12 Thread Bert Gunter
No reproducible example, so hard to say. What class is your "date" column? -- factor, character, Date? See ?Date Once you have an object of appropriate class -- see ?format.Date -- ?months can extract the month and ?ave can do your averaging. No explicit looping is needed. The tidydata alternativ

Re: [R] Query on R-squared correlation coefficient for linear regression through origin

2018-09-27 Thread Rui Barradas
Hello, As for R^2 in Excel for models without an intercept, maybe the following are relevant. https://support.microsoft.com/en-us/help/829249/you-will-receive-an-incorrect-r-squared-value-in-the-chart-tool-in-exc https://stat.ethz.ch/pipermail/r-help/2012-July/318347.html Hope this helps,

Re: [R] Query on R-squared correlation coefficient for linear regression through origin

2018-09-27 Thread peter dalgaard
This is an old discussion. The thing that R is doing is to compare the model to the model without any regressors, which in the no-intercept case is the constant zero. Otherwise, you would be comparing non-nested models and the R^2 would not satisfy the property of being between 0 and 1. A simi

Re: [R] Query on R-squared correlation coefficient for linear regression through origin

2018-09-27 Thread Eric Berger
See also this thread in stats.stackexchange https://stats.stackexchange.com/questions/26176/removal-of-statistically-significant-intercept-term-increases-r2-in-linear-mo On Thu, Sep 27, 2018 at 3:43 PM, J C Nash wrote: > This issue that traces back to the very unfortunate use > of R-squared a

Re: [R] Query on R-squared correlation coefficient for linear regression through origin

2018-09-27 Thread J C Nash
This issue that traces back to the very unfortunate use of R-squared as the name of a tool to simply compare a model to the model that is a single number (the mean). The mean can be shown to be the optimal choice for a model that is a single number, so it makes sense to try to do better. The OP ha

Re: [R] Query on read.xls function in gdata

2018-09-06 Thread PIKAL Petr
ver is easiest and most convenient to you. Cheers Petr From: Aakash Kumar Sent: Thursday, September 6, 2018 2:48 PM To: PIKAL Petr ; r-help@r-project.org Subject: RE: [R] Query on read.xls function in gdata Thanks for the suggestion, Petr. I did try using read_xls and read_excel functions,

Re: [R] Query on read.xls function in gdata

2018-09-06 Thread Jeff Newmiller
Without a reproducible example that is highly unlikely to happen. However, you might just want to try the openxlsx or readxl packages instead. On September 6, 2018 3:43:05 AM PDT, Aakash Kumar wrote: >Hi Team, > >I am trying to read in .xls files in R using read.xls function present >in >gdata p

Re: [R] Query on read.xls function in gdata

2018-09-06 Thread PIKAL Petr
Hi If you do not need to stick with gdata you could try package readxl, it does not need any further packages. https://cran.r-project.org/web/packages/readxl/readxl.pdf It results in tibble data but change to data.frame is easy. Cheers Petr > -Original Message- > From: R-help On Behal

Re: [R] Query on convergence

2018-07-25 Thread PIKAL Petr
Hi maybe ii<-TRUE while(ii) { do something if(some condition of two variables is met) {ii <- FALSE} } But in R such constructions are seldom necessary. Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of tembe- > atanasio...@ynu.jp > Sen

Re: [R] Query on while loop

2018-07-20 Thread Bert Gunter
I don't know how to say this charitably, but your post indicates that you **really need to go through an R tutorial or two.** Rather than give you answers to these very basic matters, a couple of hints: 1. A and P are vectors with 3 elements, not matrices . 2. I presume things like c11 and c32 a

Re: [R] Query regarding simulating weibull aft model with predefined censoring rate

2018-07-18 Thread Bert Gunter
Off topic for r-help (see posting guide linked below). Suggest Posting on stats.stackexchange.com instead.. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic

Re: [R] Query - Merging and conditional replacement of values in a data frame

2017-02-13 Thread MacQueen, Don
How about this? foo <- merge(df1, df2, all=TRUE) is.new <- !is.na(foo$v11) foo$v1[is.new] <- foo$v11[is.new] foo <- foo[, names(df1)] > foo time v1 v2 v3 11 2 3 4 22 5 6 4 33 112 3 4 44 112 3 4 55 2 3 4 66 2 3 4 -- Don MacQueen Lawrence Livermo

Re: [R] Query - Merging and conditional replacement of values in a data frame

2017-02-12 Thread Bhaskar Mitra
Thanks for all your help. This is helpful. Best, Bhaskar On Sun, Feb 12, 2017 at 4:35 AM, Jim Lemon wrote: > Hi Bhaskar, > Maybe: > > df1 <-read.table(text="time v1 v2 v3 > 1 2 3 4 > 2 5 6 4 > 3 1 3 4 > 4 1 3 4 > 5 2 3 4 > 6 2 3 4", > header=TRUE) > >

Re: [R] Query - Merging and conditional replacement of values in a data frame

2017-02-12 Thread Jim Lemon
Hi Bhaskar, Maybe: df1 <-read.table(text="time v1 v2 v3 1 2 3 4 2 5 6 4 3 1 3 4 4 1 3 4 5 2 3 4 6 2 3 4", header=TRUE) df2 <-read.table(text="time v11 v12 v13 3 112 3 4 4 112 3 4", header=TRUE) for(time1 in df1$time) { time2<-which(df2$

Re: [R] Query - Merging and conditional replacement of values in a data frame

2017-02-11 Thread Jeff Newmiller
Or use rownames and subscripting? df1 <- read.table( text= "time v1 v2 v3 1 2 3 4 2 5 6 4 3 1 3 4 4 1 3 4 5 2 3 4 6 2 3 4 ",header=TRUE) df2 <- read.table( text= "time v11 v12 v13 3 112 3 4 4 112 3 4 ",header=TRUE) df3 <- df1 rownames( d

Re: [R] Query - Merging and conditional replacement of values in a data frame

2017-02-11 Thread Bert Gunter
Your "assignments" (<-) are not legitimate R code that can be cut and pasted. Learn to use dput() to provide examples that we can use. You fail to say whether the time column of df2 is a proper subset of df1 or may contain times not in df1. I shall assume the latter. You also did not say whether t

Re: [R] Query regarding Approximate/Fuzzy matching & String Extraction(numeric) in R

2016-09-24 Thread Bert Gunter
"So I want a **Fuzzy logic approach** to..." That is a near meaningless buzzword. I suggest you search on "fuzzy logic" on the rseek.org website and see if any of the hits there does whatever it is that you have in mind. Cheers, Bert Bert Gunter "The trouble with having an open mind is that

Re: [R] Query regarding Approximate/Fuzzy matching & String Extraction(numeric) in R

2016-09-24 Thread David Winsemius
> On Sep 24, 2016, at 11:49 AM, Aarushi Kaushal > wrote: > > Hey there, > > I work for an organisation named Bullero Capital Pvt. Ltd. in New Delhi, > which is involved in financial services, Portfolio management to be > precise. Recently we've started creating ourselves a database using R for

Re: [R] Query on the R of free soft version 3

2016-09-21 Thread John Kane
What is your operating system? Please do not post in HTML. John Kane Kingston ON Canada > -Original Message- > From: kkam-...@echigo.ne.jp > Sent: Wed, 21 Sep 2016 09:30:15 +0900 > To: r-help@r-project.org > Subject: [R] Query on the R of free soft version 3 > > Dear > > > > Althoug

Re: [R] Query on the R of free soft version 3

2016-09-21 Thread PIKAL Petr
Hi > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Kamin > Kyuji > Sent: Wednesday, September 21, 2016 2:30 AM > To: R-help@r-project.org > Subject: [R] Query on the R of free soft version 3 > > Dear > > > > Although I can install the new version of t

Re: [R] Query on the R of free soft version 3

2016-09-21 Thread David Winsemius
> On Sep 20, 2016, at 5:30 PM, Kamin Kyuji wrote: > > Dear > > > > Although I can install the new version of the R, I can not open the soft. > > > > How do I do it? Surely you will need to tell us more than that. This just tells us you are having problems but nothing else. > > > > K

Re: [R] Query to find minimum value in a matrix in R

2016-09-16 Thread PIKAL Petr
Hi you can follow logic of functions by using debug and see how they operate by inspecting objects evaluated within functions. See ?debug However it seems to me that your functions are quite complicated. If I understand correctly, they compute minimum value of upper part of matrix. If I am co

Re: [R] Query to find minimum value in a matrix in R

2016-09-16 Thread S Ellison
> I am unable to understand the line in red code Colour does not survive plain text transmission; try adding comments (# ...) instead, or state which line of code you do not understand. In the mean time you could take a look, first, as ?cbind ?apply ?'[' with particular attention to the meani

Re: [R] Query about Text Preprocessing (Encoding)

2016-05-29 Thread Duncan Murdoch
On 29/05/2016 3:20 AM, Khadija Shakeel wrote: i want to work with Urdu language but R is only displaying Urdu text but cant work with Urdu text. Actually I want to apply preproessing steps of text mining. but R is nor responding for this text. Help me how can I handle this problem? here are some

Re: [R] Query about use of format in strptime

2016-04-11 Thread MacQueen, Don
;. >I am not able to create a sequence of class "POSIXlt" "POSIXt", in order >to merge the two data frames. > >Could you please help me in this? >Thank you again for your attention >Stefano > > > >Da: Jim Lemon

Re: [R] Query about use of format in strptime

2016-04-11 Thread David Winsemius
s in them and now you want no dashes. Make up our mind: init_day="20071119" fin_day="20071121". df_new <- data.frame(data_strptime=seq(as.POSIXct(init_day, %Y%M%D%H%M"), as.POSIXct(fin_day, %Y%M%D%H%M"), by="

Re: [R] Query about use of format in strptime

2016-04-11 Thread Stefano Sofia
__ Da: Jim Lemon [drjimle...@gmail.com] Inviato: lunedì 11 aprile 2016 9.47 A: Stefano Sofia Cc: r-help@r-project.org Oggetto: Re: [R] Query about use of format in strptime Hi Stefano, As the help page says: "The default for the format methods is "%Y-%m-%d %H:%M:%S" if a

Re: [R] Query about use of format in strptime

2016-04-11 Thread Enrico Schumann
On Mon, 11 Apr 2016, Stefano Sofia writes: > Dear R-list users, > I need to use strptime because I have to deal with date with hours and > minutes. > I read the manual for strptime and I also looked at many examples, but when I > try to apply it to my code, I always encounter some problems. > I

Re: [R] Query about use of format in strptime

2016-04-11 Thread Jim Lemon
Hi Stefano, As the help page says: "The default for the format methods is "%Y-%m-%d %H:%M:%S" if any element has a time component which is not midnight, and "%Y-%m-%d" otherwise. This is because when the result is printed, it uses the default format. If you want a specified output representation:

Re: [R] Query - 'R' for commercial use

2016-02-29 Thread John McKown
On Mon, Feb 29, 2016 at 10:37 AM, Vishal Vinayak Mujumdar 2 < vmujumd...@sapient.com> wrote: > Hello Sir, > > We are planning to recommend 'R' as solution for Micro Services > implementation in one of the ongoing project. ​Sounds good to me.​ > > Please can you assist us with providing info

Re: [R] Query - 'R' for commercial use

2016-02-29 Thread David Winsemius
> On Feb 29, 2016, at 8:37 AM, Vishal Vinayak Mujumdar 2 > wrote: > > Hello Sir, > > We are planning to recommend 'R' as solution for Micro Services > implementation in one of the ongoing project. > > Please can you assist us with providing information pertaining to license > cost , commer

Re: [R] Query in R.

2016-02-29 Thread Marco Scutari
Hi Rachana, On 23 February 2016 at 12:38, Rachana Bagde wrote: > Can anyone please solve this query. > > http://stackoverflow.com/questions/35577484/cpquery-of-bnlearn-gives-0-for-every-event-and-evidence-in-r I think there are several problems with your code. 1) Your variables are continuous,

Re: [R] Query in R.

2016-02-23 Thread Duncan Murdoch
On 23/02/2016 7:38 AM, Rachana Bagde wrote: Can anyone please solve this query. http://stackoverflow.com/questions/35577484/cpquery-of-bnlearn-gives-0-for-every-event-and-evidence-in-r This is just spam. If you want to ask a question here, please take the time to formulate it properly. Du

Re: [R] Query

2014-06-24 Thread Sarah Goslee
Have you installed it, perhaps with install.packages("ltm") ??? If you have, and it installed correctly, then we'll need the information on your system requested in the posting guide linked at the end of this message. Sarah On Tue, Jun 24, 2014 at 1:49 PM, Anchal wrote: > Dear Sir, > > I wis

Re: [R] Query regarding solution of delay differential equations with distributed delay (volterra type)

2013-12-17 Thread David Winsemius
On Dec 17, 2013, at 7:14 AM, ghoshm ghosh wrote: > Dear R-user, > > Please let me know whether there is any package in R, which can solve delay > differential equations with distributed delay (volterra type). library(sos) findFn(volterra:) http://finzi.psych.upenn.edu/R/library/deSolve/html/ls

Re: [R] Query on R plot : Unequispaced label on x-axis

2013-07-24 Thread Duncan Murdoch
On 24/07/2013 10:06 AM, ritwi...@isical.ac.in wrote: Dear R users, I want to plot a one variable continuous function f(x) vs x, x=[0,1]. Say for example: f(x)= x^2. Now, using the command plot(f~x) I will get a curve where the range of x-axis is [0,1] with all equispaced label. But, I need somet

Re: [R] query in plot(intervals....

2013-05-14 Thread ilai
On Tue, May 14, 2013 at 10:05 AM, Michelle Morters wrote: > Hi - > > I would like the plot ordered by intercept. > One way will be to tweak the ?intervals.lmList object require(nlme) fm1 <- intervals(lmList(distance ~ age | Subject, Orthodont)) fm2 <- fm1[order(fm1[,2,1]),,] class(fm2) <- class(

Re: [R] query re plot(confint(lmList...

2013-05-14 Thread John Kane
Or better yet see ?dput, sorry. John Kane Kingston ON Canada > -Original Message- > From: jrkrid...@inbox.com > Sent: Tue, 14 May 2013 09:20:59 -0800 > To: mm...@hermes.cam.ac.uk, r-help@r-project.org > Subject: Re: [R] query re plot(confint(lmList... > > Please do

Re: [R] query re plot(confint(lmList...

2013-05-14 Thread Duncan Murdoch
On 14/05/2013 11:54 AM, Michelle Morters wrote: Hi - My sample size is about 190, consequently the plot output (below) is quite squashed up and the id numbers down the L axis overlay each other and are not legible plot(confint(lmList(x ~ slope | id, data), pooled = TRUE), order = 1) Is it poss

Re: [R] query re plot(confint(lmList...

2013-05-14 Thread John Kane
Please don't post in html. The list strips it out and we, now, have no idea of what you are doing. Have a look at https://github.com/hadley/devtools/wiki/Reproducibility for suggestions on how to ask a qustion here. Sample code and sample data (see ?dupt) are usually desirable. John Kane Kin

Re: [R] query labels in iplot() (or other interactive scatterplot)

2013-02-28 Thread Greg Snow
The HWidentify and HTKidentify functions in the TeachingDemos package let you specify a label for each point, then that label is displayed when you hover over that point with the mouse (and it goes away when you move the mouse away from that point). On Thu, Feb 28, 2013 at 8:36 AM, Agustin Lobo w

  1   2   >