[R] A humble request

Muhammad Zubair Chishti mzch|@ht| @end|ng |rom eco@q@u@edu@pk
Sat Jul 9 19:45:12 CEST 2022


Dear Respected Experts,
Thank you so much for your precious time and generous support. My issue is
resolved now.

Regards

On Sun, 3 Jul 2022, 20:48 Spencer Graves, <
spencer.graves using effectivedefense.org> wrote:

> Hi, Richard:  Thanks for the question.
>
>
>           "Source the function" means the following.
>
>
>           1.  Go to "https://cran.r-project.org/" and download the most
> recent
> version.  To do that, I found "archived" under "Related Directories".  I
> clicked on that and then searched for "wmtsa".  To the right of that, it
> says it was "Last Modified" "2020-06-09 07:24".  Note that "Last
> Modified", because you can use that to find recent documentation, etc.,
> from "archive.org" shortly prior to that date.
>
>
>           2.  Click on "wmtsa".  That takes you to "Index of
> /src/contrib/Archive/wmtsa", which includes 11 different versions of the
> source code for that package from "wmtsa_1.0-1.tar.gz 2007-09-23 21:54
> 139K" to "wmtsa_2.0-3.tar.gz 2017-12-06 12:14 151K" Click on the last
> one to download it.  This downloaded a file by that name to the
> "Downloads" folder in my computer.
>
>
>           3.  Create a directory for that file.  I have a directory called
> "R"
> on my computer.  I just created a new directory called "wmtsa" within
> that "R" directory.  Then I moved that file into that directory and
> unzip it by double clicking on it.  As a result, I now have a directory
> "~R/wmtsa/wmtsa".
>
>
>           4.  To compile that package, I routinely in a Terminal in R
> (called
> something else in Windows), I "cd" until I get to "~R/wmtsa".  Then I
> run "R CMD check "wmtsa_2.0-3.tar.gz".  I just did that.  It said,
> "ERROR  Packages required but not available: 'splus2R', 'ifultools'".
> In R, I was able to download the first using
> "install.packages('splus2R')".  When I tried
> "install.packages('ifultools')", I got a message, "package ‘ifultools’
> is not available for this version of R".
>
>
>           5.  However, the inner "wmtsa" directory contains, among other
> things, directories called "man" and "R".  The latter directory contains
> files with names like "wav_boot.R", ..., "wav_xform.R".  I'm assuming
> you have documentation that tells you which function(s) you want to run.
>   Let's say you want to run "wavBestBasis".  If you are lucky, there
> will be a file with a name like "wavBestBasis.R".  That doesn't work in
> this case.  So instead I did a cd into that ~R/wmtsa/wmtsa/R".  Then I
> did "grep 'wavBestBasis' *.R".  I got the following:
>
>
> wav_xform.R:##    wavBestBasis
> wav_xform.R:# wavBestBasis
> wav_xform.R:"wavBestBasis" <- function(costs)
> Let's say it says you want to start with a f
>
>
>           6.  That says that "wavBestBasis" is in file "wav_xform.R".  I
> opened
> that file in RStudio (I use the free version) then clicked on the
> "Source" button in the upper right.
>
>
>           7.  Also, in the directory "~R/wmtsa/wmtsa/man" I found a file
> called
> "wavBestBasis.Rd".  I opened that in R.  To learn how to read that, you
> can type "help.start()", which will open a menu that includes, "Writing
> R Extensions".  Click that.  That tells you how to write (and read) a
> *.Rd file.  That file "wavBestBasis.Rd" contains and "\examples"
> section.  The first line in that section is "W <-
> wavDWPT(diff(atomclock), n.level=6)".  I ran that, and got:
>
>
> Error in diff(atomclock) : object 'atomclock' not found
>
>
>           I won't discuss how to find "atomclick".  If you need that, you
> can
> ask again.
>
>
>           Hope this helps.
>           Spencer
>
>
> On 7/3/22 8:15 AM, Richard O'Keefe wrote:
> > I'm not quite sure what "source the fonction" means.
> > The wmtsa package is available from the archive as a
> > compressed archive wmtsa_2.0-3.tar.gz.
> > % tar xf wmtsa_2.0-3.tar.gz
> > creates a directory wmtsa/ with subdirectories
> > wmtsa/man and wmtsa/R plus some other files.
> > The documentation is in wmtsa/man/*.md
> > The source code is in wmtsa/R/*.R
> > You look at either using whatever text editor you feel like.
> > Looking at wav_xform.R I see hundreds of lines of code
> > that only a mother could love, with a good table of contents
> > but no really informative comments anywhere.
> > I am reminded, as too often, that there are people who develop packages
> > for R, and there are software engineers, but there are precious few
> > software engineers developing packages for R.
> > As it happens, I *am* a software engineer (amongst other things),
> > and I do have a tolerably good knowledge of base R, and a high tolerance
> > for looking things up in the documentation.  But I would have to be paid
> > quite a large sum of money before I would spend any time on this
> > code-base.  There are other currently maintained packages that might be
> > able to do the job, so it would be a waste of my time.
> >
> > My advice is
> >    DON'T spend any time looking at this code.
> >    An R beginning WON'T understand it.
> >    DO ask your supervisor help you to select an alternative,
> >    and if you can't figure that out between you,
> >    ASK a more informative question.
> >
> >
> >
> > On Mon, 4 Jul 2022 at 00:38, John Kane <jrkrideau using gmail.com
> > <mailto:jrkrideau using gmail.com>> wrote:
> >
> >     Spenser,
> >     the idea to source the fonction makes sense but since tho OP is a
> very
> >     new beginner perhaps you could point him towards code showing him how
> >     to do this?  I have never done this AFAIR, and while I suspect a few
> >     minutes googling would show me how, it is likely to be more difficult
> >     for a noobie.
> >
> >     On Sun, 3 Jul 2022 at 07:25, Spencer Graves
> >     <spencer.graves using effectivedefense.org
> >     <mailto:spencer.graves using effectivedefense.org>> wrote:
> >      >
> >      > Muhammad Zubair Chishti:
> >      >
> >      >
> >      >           What specifically have you tried?  What were the
> results?
> >      >
> >      >
> >      >           Please "provide commented, minimal, self-contained,
> >     reproducible
> >      > code", per "the posting guide
> >      > http://www.R-project.org/posting-guide.html
> >     <http://www.R-project.org/posting-guide.html>", as indicated in at
> >     the end
> >      > of each email in this thread.
> >      >
> >      >
> >      >           And don't overlook the suggestion I made:  Download the
> >     archived
> >      > package.  Do NOT try to compile it. Instead source only the
> >     function you
> >      > want, try to run it.  With luck, it will work.  If it doesn't,
> >     you will
> >      > get a diagnostic that can help you take the next step.
> >      >
> >      >
> >      >           Spencer
> >      >
> >      >
> >      > On 7/3/22 1:28 AM, Andrew Simmons wrote:
> >      > > It seems like this package was archived because package
> "ifultools"
> >      > > was archived. I tried installing "ifultools" from source, but
> >     it has a
> >      > > seriously large amount of C compilation issues. The main issue
> >     seems
> >      > > to be that variable PROBLEM was never defined anywhere, and it
> is
> >      > > unclear what its definition should be. Unfortunately, as far as
> >     I can
> >      > > tell, this issue is unfixable. If you want to install "wmtsa",
> >     you'll
> >      > > have to use an older version of R. Otherwise, you can use one
> >     of the
> >      > > other wavelet analysis packages that Richard O'Keefe mentioned.
> >      > >
> >      > > On Sun, Jul 3, 2022 at 2:01 AM Muhammad Zubair Chishti
> >      > > <mzchishti using eco.qau.edu.pk <mailto:mzchishti using eco.qau.edu.pk>>
> wrote:
> >      > >>
> >      > >> Dear Respected Experts and specifically Professor Richard
> O'Keefe,
> >      > >> Thank you so much for your precious time and generous help.
> >     However, the
> >      > >> problem is still there and I am just unable to resolve it due
> >     to the lack
> >      > >> of expertise in R. Still, the hope is there. I believe that
> >     this platform
> >      > >> can help me.
> >      > >>
> >      > >> Regards
> >      > >> Muhammad Zubair Chishti
> >      > >> School of Business,
> >      > >> Zhengzhou University, Henan, China
> >      > >> My Google scholar link:
> >      > >> https://scholar.google.com/citations?hl=en&user=YPqNJMwAAAAJ
> >     <https://scholar.google.com/citations?hl=en&user=YPqNJMwAAAAJ>
> >      > >> My ReseachGate Profile:
> >      > >> https://www.researchgate.net/profile/Muhammad-Chishti
> >     <https://www.researchgate.net/profile/Muhammad-Chishti>
> >      > >>
> >      > >>
> >      > >> On Sun, Jul 3, 2022 at 9:11 AM Richard O'Keefe
> >     <raoknz using gmail.com <mailto:raoknz using gmail.com>> wrote:
> >      > >>
> >      > >>> A postscript to my previous comment.
> >      > >>> I used to supervise PhD students.
> >      > >>> Let me advise you to write this issue up as a draft section
> >     for your
> >      > >>> thesis.
> >      > >>> 1. Why I wanted to use the wmtsa package.
> >      > >>> 2. Why I didn't.
> >      > >>> 3. How I went about selecting a replacement.
> >      > >>> 4. What I chose and why that's the right choice.
> >      > >>> 5. How the analyses I wanted to do are done in
> >      > >>>     package X and what difference it makes.
> >      > >>>
> >      > >>> Off the top of my head, the only reasons for struggling to
> >     use an old
> >      > >>> package are to try to replicate someone else's results and/or
> >     to try to use
> >      > >>> their software (built atop the dead package) with new data.
> >     Well, if you
> >      > >>> get different results, that's interesting too, and then it's
> >     time to work
> >      > >>> harder to resurrect the dead package.
> >      > >>>
> >      > >>> Speaking of which, an easier route might be to set up a
> separate
> >      > >>> environment running an old version of R that *can* run the
> >     old code and the
> >      > >>> old code's dependencies.  In fact trying to use the same
> >     versions that the
> >      > >>> work you're trying to reproduce used might make a lot of
> sense.
> >      > >>>
> >      > >>> Overall, I think selecting an alternative package
> >      > >>> that *is* currently maintained is the best use of your time,
> >     but your
> >      > >>> supervisor should be able to help you with that.  Selecting
> >     appropriate
> >      > >>> packages is part of doing research, after all, and
> demonstrating
> >      > >>> that you can do it is all to the good, no?
> >      > >>>
> >      > >>>
> >      > >>> On Sun, 3 Jul 2022 at 15:24, Richard O'Keefe
> >     <raoknz using gmail.com <mailto:raoknz using gmail.com>> wrote:
> >      > >>>
> >      > >>>> Can we start a step back please?
> >      > >>>> wmtsa stands for
> >      > >>>>    Wavelet Methods for Time Series Analysis.
> >      > >>>>
> >      > >>>> OK, so you have some time series data,
> >      > >>>> and for some reason you want to analyse
> >      > >>>> your data using wavelets.  No worries.
> >      > >>>> But does it have to be THIS unmaintained
> >      > >>>> package?
> >      > >>>>
> >      > >>>> Why not visit
> >      > >>>>
> >      > >>>> https://CRAN.R-project.org/view=TimeSeries
> >     <https://CRAN.R-project.org/view=TimeSeries>
> >      > >>>> and search for "wavelets" in the text?
> >      > >>>> Oh heck, I might as well do it for you.
> >      > >>>> <snip>
> >      > >>>> *Wavelet methods* : The wavelets
> >      > >>>> <https://cran.r-project.org/web/packages/wavelets/index.html
> >     <https://cran.r-project.org/web/packages/wavelets/index.html>>
> package
> >      > >>>> includes computing wavelet filters, wavelet transforms and
> >     multiresolution
> >      > >>>> analyses. Multiresolution forecasting using wavelets is also
> >     implemented in
> >      > >>>> mrf <https://cran.r-project.org/web/packages/mrf/index.html
> >     <https://cran.r-project.org/web/packages/mrf/index.html>>.
> WaveletComp
> >      > >>>>
> >     <https://cran.r-project.org/web/packages/WaveletComp/index.html
> >     <https://cran.r-project.org/web/packages/WaveletComp/index.html>>
> >      > >>>> provides some tools for wavelet-based analysis of univariate
> >     and bivariate
> >      > >>>> time series including cross-wavelets, phase-difference and
> >     significance
> >      > >>>> tests. biwavelet
> >      > >>>>
> >     <https://cran.r-project.org/web/packages/biwavelet/index.html
> >     <https://cran.r-project.org/web/packages/biwavelet/index.html>> is a
> >     port
> >      > >>>> of the WTC Matlab package for univariate and bivariate
> >     wavelet analyses.
> >      > >>>> mvLSW
> >     <https://cran.r-project.org/web/packages/mvLSW/index.html
> >     <https://cran.r-project.org/web/packages/mvLSW/index.html>>
> >      > >>>> provides tools for multivariate locally stationary wavelet
> >     processes.
> >      > >>>> LSWPlib
> >     <https://cran.r-project.org/web/packages/LSWPlib/index.html
> >     <https://cran.r-project.org/web/packages/LSWPlib/index.html>>
> >      > >>>> contains functions for simulation and spectral estimation of
> >     locally
> >      > >>>> stationary wavelet packet processes. Tests of white noise
> >     using wavelets
> >      > >>>> are provided by hwwntest
> >      > >>>> <https://cran.r-project.org/web/packages/hwwntest/index.html
> >     <https://cran.r-project.org/web/packages/hwwntest/index.html>>.
> Wavelet
> >      > >>>> scalogram tools are contained in wavScalogram
> >      > >>>>
> >     <https://cran.r-project.org/web/packages/wavScalogram/index.html
> >     <https://cran.r-project.org/web/packages/wavScalogram/index.html>>.
> >      > >>>> Further wavelet methods can be found in the packages rwt
> >      > >>>> <https://cran.r-project.org/web/packages/rwt/index.html
> >     <https://cran.r-project.org/web/packages/rwt/index.html>>, waveslim
> >      > >>>> <https://cran.r-project.org/web/packages/waveslim/index.html
> >     <https://cran.r-project.org/web/packages/waveslim/index.html>>,
> >     wavethresh
> >      > >>>>
> >     <https://cran.r-project.org/web/packages/wavethresh/index.html
> >     <https://cran.r-project.org/web/packages/wavethresh/index.html>>.
> >      > >>>> </snip>
> >      > >>>>
> >      > >>>> Presumably there is a reason that nobody else has
> >      > >>>> bothered to continue maintaining wmtsa.  Perhaps
> >      > >>>> one of those other wavelets + time series packages
> >      > >>>> can do what you need?
> >      > >>>>
> >      > >>>>
> >      > >>>> On Sun, 3 Jul 2022 at 04:12, Muhammad Zubair Chishti <
> >      > >>>> mzchishti using eco.qau.edu.pk <mailto:mzchishti using eco.qau.edu.pk>>
> >     wrote:
> >      > >>>>
> >      > >>>>> Dear Experts,
> >      > >>>>> I cannot find a package "wmtsa" for my R version "R 4.2.0".
> >     Kindly help
> >      > >>>>> me
> >      > >>>>> to find it or share the link with me.
> >      > >>>>> Although I tried the old version of "wmtsa" but failed.
> >      > >>>>> Thank you for your precious time.
> >      > >>>>>
> >      > >>>>> Regards
> >      > >>>>> Muhammad Zubair Chishti
> >      > >>>>>
> >      > >>>>>          [[alternative HTML version deleted]]
> >      > >>>>>
> >      > >>>>> ______________________________________________
> >      > >>>>> R-help using r-project.org <mailto:R-help using r-project.org> mailing
> >     list -- To UNSUBSCRIBE and more, see
> >      > >>>>> https://stat.ethz.ch/mailman/listinfo/r-help
> >     <https://stat.ethz.ch/mailman/listinfo/r-help>
> >      > >>>>> PLEASE do read the posting guide
> >      > >>>>> http://www.R-project.org/posting-guide.html
> >     <http://www.R-project.org/posting-guide.html>
> >      > >>>>> and provide commented, minimal, self-contained,
> >     reproducible code.
> >      > >>>>>
> >      > >>>>
> >      > >>
> >      > >>          [[alternative HTML version deleted]]
> >      > >>
> >      > >> ______________________________________________
> >      > >> R-help using r-project.org <mailto:R-help using r-project.org> mailing
> >     list -- To UNSUBSCRIBE and more, see
> >      > >> https://stat.ethz.ch/mailman/listinfo/r-help
> >     <https://stat.ethz.ch/mailman/listinfo/r-help>
> >      > >> PLEASE do read the posting guide
> >     http://www.R-project.org/posting-guide.html
> >     <http://www.R-project.org/posting-guide.html>
> >      > >> and provide commented, minimal, self-contained, reproducible
> code.
> >      > >
> >      > > ______________________________________________
> >      > > R-help using r-project.org <mailto:R-help using r-project.org> mailing list
> >     -- To UNSUBSCRIBE and more, see
> >      > > https://stat.ethz.ch/mailman/listinfo/r-help
> >     <https://stat.ethz.ch/mailman/listinfo/r-help>
> >      > > PLEASE do read the posting guide
> >     http://www.R-project.org/posting-guide.html
> >     <http://www.R-project.org/posting-guide.html>
> >      > > and provide commented, minimal, self-contained, reproducible
> code.
> >      >
> >      > ______________________________________________
> >      > R-help using r-project.org <mailto:R-help using r-project.org> mailing list
> >     -- To UNSUBSCRIBE and more, see
> >      > https://stat.ethz.ch/mailman/listinfo/r-help
> >     <https://stat.ethz.ch/mailman/listinfo/r-help>
> >      > PLEASE do read the posting guide
> >     http://www.R-project.org/posting-guide.html
> >     <http://www.R-project.org/posting-guide.html>
> >      > and provide commented, minimal, self-contained, reproducible code.
> >
> >
> >
> >     --
> >     John Kane
> >     Kingston ON Canada
> >
> >     ______________________________________________
> >     R-help using r-project.org <mailto:R-help using r-project.org> mailing list --
> >     To UNSUBSCRIBE and more, see
> >     https://stat.ethz.ch/mailman/listinfo/r-help
> >     <https://stat.ethz.ch/mailman/listinfo/r-help>
> >     PLEASE do read the posting guide
> >     http://www.R-project.org/posting-guide.html
> >     <http://www.R-project.org/posting-guide.html>
> >     and provide commented, minimal, self-contained, reproducible code.
> >
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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, reproducible code.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list