Re: [R] [External] latticeExtra

2023-06-05 Thread Thomas Subia via R-help
 Colleagues,
Thanks for the help!
Root cause of the problem was not to define z and x as factors!Now I know 
better.
All the best,
Thomas Subia


On Monday, June 5, 2023 at 08:45:39 PM PDT, Richard M. Heiberger 
 wrote:  
 
 This works.
> d$zz <- factor(d$z, levels=c("low","med","high"))
> d$xx <- as.factor(d$x)
> cloud(y~xx+zz, d, panel.3d.cloud=panel.3dbars, col.facet='grey', 
+      xbase=0.4, ybase=0.4, scales=list(arrows=FALSE, col=1), 
+      par.settings = list(axis.line = list(col = "transparent")))
> 

the default levels for factor are alphabetic.  That is ok for d$x.

  
[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] [External] latticeExtra

2023-06-05 Thread Richard M. Heiberger
This works.
> d$zz <- factor(d$z, levels=c("low","med","high"))
> d$xx <- as.factor(d$x)
> cloud(y~xx+zz, d, panel.3d.cloud=panel.3dbars, col.facet='grey', 
+   xbase=0.4, ybase=0.4, scales=list(arrows=FALSE, col=1), 
+   par.settings = list(axis.line = list(col = "transparent")))
> 

the default levels for factor are alphabetic.  That is ok for d$x.

__
R-help@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.


[R] latticeExtra

2023-06-05 Thread Thomas Subia via R-help
Colleagues,

I am trying to create a 3D barplot using the following script

d <- read.table(text=' x   y z
t1   5   high
t1   2   low
t1   4   med
t2   8   high
t2   1   low
t2   3   med
t3  50   high
t3  12   med
t3  35   low', header=TRUE)

library(latticeExtra)

cloud(y~x+z, d, panel.3d.cloud=panel.3dbars, col.facet='grey', 
  xbase=0.4, ybase=0.4, scales=list(arrows=FALSE, col=1), 
  par.settings = list(axis.line = list(col = "transparent")))

Executing this results in this error message

Error using packet 1
non-numeric argument to binary operator

I suspect that this error stems from read.table.

This graph is easily done with Excel but I'd rather use R

Any help would be appreciated.

Thanks

Thomas Subia

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] Adding a numeric class to a data.frame

2023-06-05 Thread Jeff Reichman
Avi

I'm not sure why but neither the "cbind" nor "with" functions seemed to work
with the numeric object so I ended up converting the object to a numeric
vector

prob <- as.numeric(pred_probability)

then used the cbind function 

df <- cbind(train, prob); which seemed to work

I do appreciate your time and assistance.

Jeff

-Original Message-
From: avi.e.gr...@gmail.com  
Sent: Monday, June 5, 2023 7:55 PM
To: 'Jeff Reichman' ; r-help@r-project.org
Subject: RE: [R] Adding a numeric class to a data.frame

Jeff,

I wish I could give you an answer to a very specific question.

You have lots of numbers in a vector representing whatever "probabilities"
mean something to you. There are currently no names associated with them.
And you want to make some kind of graph using ggplot.

So, to be quite clear, ggplot tends to like a data.frame or one of several
other such tabular constructs when making graphs, or have some data coerced
into such a format. BUT I am aghast at the concept of giving it a data.frame
with one row and thousands of un-named columns. First, the columns will have
semi-numerical names by default and second, they cannot be used by ggplot
unless you specify a name.

What you normally need is not lots of columns but lots of rows. One column
suffices for some purposes and multiple columns are often present for many
purposes. 

But what are you graphing as in probability versus what? Is that item
correlated with each result in some way? 

You eventually need to probably make a data.frame with two or more such
columns with names for the columns. You need to tell ggplot something like 

ggplot(mydata, aes(x=whatever, y=whatever, ...)) + geom_line(or whatever)
...

But as you release info this slowly, I think I will now drop out of this
conversation.

Good luck.

-Original Message-
From: Jeff Reichman 
Sent: Monday, June 5, 2023 7:29 AM
To: avi.e.gr...@gmail.com; r-help@r-project.org
Subject: RE: [R] Adding a numeric class to a data.frame

Avi

But I don't have a column header to call. Do I simply use column position 

> pred_probability
 1  2  3  5  8 
0.001156612672 0.000926702837 0.008162332353 0.001544764162 0.000919503109
..
> str(pred_probability )
 Named num [1:6964] 0.001157 0.000927 0.008162 0.001545 0.00092 ...
 - attr(*, "names")= chr [1:6964] "1" "2" "3" "5" ...
>

Jeff

-Original Message-
From: avi.e.gr...@gmail.com 
Sent: Sunday, June 4, 2023 9:58 PM
To: 'Jeff Reichman' ; r-help@r-project.org
Subject: RE: [R] Adding a numeric class to a data.frame

Jeff,

The number of items is not relevant except insofar as your vector of
probabilities is in the same order as the other vector and the same length.

If for example you had a vector of test scores for 10,000 tests and you
calculated the probability in the data of having a 100, then the probability
of a 99 and so on, then you could make another vector of 10,000 giving the
probability of the corresponding entries.

So before calling ggplot, assuming you have two vectors called orig and
prob, you make a data.frame like

Df <- data.frame(orig=orig, prob=prob)

You use that in ggplot.

You can of course add additional columns. Or if your data is in another
format, do things like long to wide conversion and many other things.

If you already have a data.frame with one or more columns including orig,
you can attache the probabilities with something as simple as:

Df$prob = prob

If you are using ggplot, you may as well be using elements of the tidyverse
that provide a different take on how to do some things compared to base R
but that is not something easily discussed here.



-Original Message-
From: Jeff Reichman 
Sent: Sunday, June 4, 2023 10:21 PM
To: avi.e.gr...@gmail.com; r-help@r-project.org
Subject: RE: [R] Adding a numeric class to a data.frame

Yes - I could have done that but I have over 5,000 calculated probabilities.
So yes a little more detail would have helped. I'm needing to add those
probability back into the original data.frame from which the model was
created as I'm going  to be using ggplot2 so I need the probabilities and
original dataframe to be one.

-Original Message-
From: avi.e.gr...@gmail.com 
Sent: Sunday, June 4, 2023 9:00 PM
To: 'Jeff Reichman' ; r-help@r-project.org
Subject: RE: [R] Adding a numeric class to a data.frame

Jeff R, it would be helpful if your intent was understood.

For example, did you want output as a column of labels c("A", "B", "C") and
another adjacent of c(0.0011566127, 0.0009267028, 0.0081623324) then you
could do:

data.frame(labels=c("A", "B", "C"), data=c(0.0011566127, 0.0009267028,
0.0081623324))
  labels data
1  A 0.0011566127
2  B 0.0009267028
3  C 0.0081623324

If you wanted your columns labeled with the data in multiple columns, try
this:

> result <- data.frame(t(c(0.0011566127, 0.0009267028, 0.0081623324))) 
> result
   X1   X2  X3

Re: [R] Adding a numeric class to a data.frame

2023-06-05 Thread avi.e.gross
Jeff,

I wish I could give you an answer to a very specific question.

You have lots of numbers in a vector representing whatever "probabilities"
mean something to you. There are currently no names associated with them.
And you want to make some kind of graph using ggplot.

So, to be quite clear, ggplot tends to like a data.frame or one of several
other such tabular constructs when making graphs, or have some data coerced
into such a format. BUT I am aghast at the concept of giving it a data.frame
with one row and thousands of un-named columns. First, the columns will have
semi-numerical names by default and second, they cannot be used by ggplot
unless you specify a name.

What you normally need is not lots of columns but lots of rows. One column
suffices for some purposes and multiple columns are often present for many
purposes. 

But what are you graphing as in probability versus what? Is that item
correlated with each result in some way? 

You eventually need to probably make a data.frame with two or more such
columns with names for the columns. You need to tell ggplot something like 

ggplot(mydata, aes(x=whatever, y=whatever, ...)) + geom_line(or whatever)
...

But as you release info this slowly, I think I will now drop out of this
conversation.

Good luck.

-Original Message-
From: Jeff Reichman  
Sent: Monday, June 5, 2023 7:29 AM
To: avi.e.gr...@gmail.com; r-help@r-project.org
Subject: RE: [R] Adding a numeric class to a data.frame

Avi

But I don't have a column header to call. Do I simply use column position 

> pred_probability 
 1  2  3  5  8 
0.001156612672 0.000926702837 0.008162332353 0.001544764162 0.000919503109
..
> str(pred_probability )
 Named num [1:6964] 0.001157 0.000927 0.008162 0.001545 0.00092 ...
 - attr(*, "names")= chr [1:6964] "1" "2" "3" "5" ...
>

Jeff

-Original Message-
From: avi.e.gr...@gmail.com  
Sent: Sunday, June 4, 2023 9:58 PM
To: 'Jeff Reichman' ; r-help@r-project.org
Subject: RE: [R] Adding a numeric class to a data.frame

Jeff,

The number of items is not relevant except insofar as your vector of
probabilities is in the same order as the other vector and the same length.

If for example you had a vector of test scores for 10,000 tests and you
calculated the probability in the data of having a 100, then the probability
of a 99 and so on, then you could make another vector of 10,000 giving the
probability of the corresponding entries.

So before calling ggplot, assuming you have two vectors called orig and
prob, you make a data.frame like

Df <- data.frame(orig=orig, prob=prob)

You use that in ggplot.

You can of course add additional columns. Or if your data is in another
format, do things like long to wide conversion and many other things.

If you already have a data.frame with one or more columns including orig,
you can attache the probabilities with something as simple as:

Df$prob = prob

If you are using ggplot, you may as well be using elements of the tidyverse
that provide a different take on how to do some things compared to base R
but that is not something easily discussed here.



-Original Message-
From: Jeff Reichman 
Sent: Sunday, June 4, 2023 10:21 PM
To: avi.e.gr...@gmail.com; r-help@r-project.org
Subject: RE: [R] Adding a numeric class to a data.frame

Yes - I could have done that but I have over 5,000 calculated probabilities.
So yes a little more detail would have helped. I'm needing to add those
probability back into the original data.frame from which the model was
created as I'm going  to be using ggplot2 so I need the probabilities and
original dataframe to be one.

-Original Message-
From: avi.e.gr...@gmail.com 
Sent: Sunday, June 4, 2023 9:00 PM
To: 'Jeff Reichman' ; r-help@r-project.org
Subject: RE: [R] Adding a numeric class to a data.frame

Jeff R, it would be helpful if your intent was understood.

For example, did you want output as a column of labels c("A", "B", "C") and
another adjacent of c(0.0011566127, 0.0009267028, 0.0081623324) then you
could do:

data.frame(labels=c("A", "B", "C"), data=c(0.0011566127, 0.0009267028,
0.0081623324))
  labels data
1  A 0.0011566127
2  B 0.0009267028
3  C 0.0081623324

If you wanted your columns labeled with the data in multiple columns, try
this:

> result <- data.frame(t(c(0.0011566127, 0.0009267028, 0.0081623324))) 
> result
   X1   X2  X3
1 0.001156613 0.0009267028 0.008162332
> names(result) <- c("A", "B", "C")
> result
AB   C
1 0.001156613 0.0009267028 0.008162332

But these are not solutions to your specified problem unless you explain
properly what you want to do and the exact expected output.



-Original Message-
From: R-help  On Behalf Of Jeff Reichman
Sent: Sunday, June 4, 2023 7:11 PM
To: r-help@r-project.org
Subject: [R] Adding a numeric class to a data.frame

R-Help Community

 

How do I add a 

Re: [R] error in arfima...

2023-06-05 Thread akshay kulkarni
Dear Martin,
 Sad that the bug is beyond your ken...

Fortunately, the error happens only rarely...The length of LYGH was 719 and 
there were only two such errors..I will just replace them with NA and make do.

By the by, what if I send LYGH as an attachment to your actual mail ( not the 
r-help mail)? Will it help? Can you then pinpoint the cause?

Or should I raise a bug report? If yes, how( I never raised one)?

THanking you,
Yours sincerely,
AKSHAY M KULKARNI

From: Martin Maechler 
Sent: Monday, June 5, 2023 3:19 PM
To: akshay kulkarni 
Cc: Martin Maechler ; R help Mailing list 

Subject: Re: [R] error in arfima...


> Dear Martin,
>  REgrets to reply this late

> I am staring at a conundrum never before encountered in my experience with R:

> LYGH[[201]]
> [1] 45.40  3.25  6.50  2.15
> > arfima(LYGH[[201]])
>  Error in .fdcov(x, fdf$d, h, nar = nar, nma = nma, hess = hess, fdf.work = 
> fdf$w) :
> NA/NaN/Inf in foreign function call (arg 5)
> > arfima(c(45.40,3.25,6.50,2.15))

> Call:
>   arfima(y = c(45.4, 3.25, 6.5, 2.15))

> Coefficients:
>d
> 4.583013e-05
> sigma[eps] = 18.01252
> a list with components:
>  [1] "log.likelihood"  "n"   "msg" "d"   
> "ar"
>  [6] "ma"  "covariance.dpq"  "fnormMin""sigma"   
> "stderror.dpq"
> [11] "correlation.dpq" "h"   "d.tol"   "M"   
> "hessian.dpq"
> [16] "length.w""residuals"   "fitted"  "call"
> "x"
> [21] "series"

> Please note that the index of LYGH has changed from 202 to 201 due to some 
> randomness in one of my function.

> PLEASE HELP.

> Output of dput LYGH[[201]]:

> > dput(LYGH[[201]])
> c(45.4, 3.25, 6.5, 2.149998)

> output of session info()

> sessionInfo()
> R version 4.1.2 (2021-11-01)
> Platform: x86_64-w64-mingw32/x64 (64-bit)


> Matrix products: default

> locale:
> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252
> [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
> [5] LC_TIME=English_United States.1252

> attached base packages:
> [1] parallel  stats graphics  grDevices utils datasets  methods   base

> other attached packages:
> [1] pbmcapply_1.5.1 imputeTS_3.3forecast_8.17.0

> loaded via a namespace (and not attached):
>  [1] Rcpp_1.0.7urca_1.3-3pillar_1.9.0  compiler_4.1.2
> tseries_0.10-51
>  [6] tools_4.1.2   xts_0.12.1nlme_3.1-153  lifecycle_1.0.3   
> tibble_3.2.1
> [11] gtable_0.3.3  lattice_0.20-45   pkgconfig_2.0.3   rlang_1.1.0   
> cli_3.6.1
> [16] rstudioapi_0.14   curl_4.3.2xml2_1.3.3dplyr_1.1.1   
> generics_0.1.3
> [21] vctrs_0.6.1   gridtext_0.1.5ggtext_0.1.2  lmtest_0.9-40 
> grid_4.1.2
> [26] nnet_7.3-16   tidyselect_1.2.0  glue_1.6.2R6_2.5.1  
> fansi_1.0.4
> [31] ggplot2_3.4.2 TTR_0.24.3magrittr_2.0.3scales_1.2.1  
> quantmod_0.4.20
> [36] timeDate_4021.106 colorspace_2.1-0  fracdiff_1.5-1quadprog_1.5-8
> utf8_1.2.3
> [41] stinepack_1.4 munsell_0.5.0 zoo_1.8-10


> PLease Also note:

> arfima(c(45.4, 3.25, 6.5, 2.149998))

> Call:
>   arfima(y = c(45.4, 3.25, 6.5, 2.149998))

> Coefficients:
>d
> 4.583013e-05
> sigma[eps] = 18.01252
> a list with components:
>  [1] "log.likelihood"  "n"   "msg" "d"   
> "ar"
>  [6] "ma"  "covariance.dpq"  "fnormMin""sigma"   
> "stderror.dpq"
> [11] "correlation.dpq" "h"   "d.tol"   "M"   
> "hessian.dpq"
> [16] "length.w""residuals"   "fitted"  "call"
> "x"
> [21] "series"


> Many thanks in advance

> Thanking you,
> Yours sincerely,
> AKSHAY M KULKARNI

Hmm... indeed, "conundrum" may be a euphemism for the
situation. which clearly points to a bug *somewhere*.
As your dput() shows, the argument *is* a simple vector .. and
even if the default dput() may loose a few bits in
precison... you did show that with (possibly only almost)
identical argument, the error did not happen.

I really have no idea what's going on, 
Some musing/ideas: the  NA/NaN/Inf  warning
may come from a memory corruption problem somewhere because some
of the involved packages using compiled code or the old version of R/lapack/???
or ??? cause it.

Does the error only happen occasionally?
If you "randomly" do a few calls of either
  arfima(c(45.4, 3.25, 6.5, 2.149998))
or
  arfima(LYGH[[201]])
do you see "random" behavior? [if yes; this confirms typically
memory protection/allocation/... bugs]

fracdiff itself has also been updated (to 1.5-2) but that was really only
a compiler warning, not a bug fix, and I cannot imagine that
that makes the difference.



had problems fixed in the mean time ..
and at least there's a hope the 

Re: [R] Adding a numeric class to a data.frame

2023-06-05 Thread Jeff Reichman
Avi

But I don't have a column header to call. Do I simply use column position 

> pred_probability 
 1  2  3  5  8 
0.001156612672 0.000926702837 0.008162332353 0.001544764162 0.000919503109
..
> str(pred_probability )
 Named num [1:6964] 0.001157 0.000927 0.008162 0.001545 0.00092 ...
 - attr(*, "names")= chr [1:6964] "1" "2" "3" "5" ...
>

Jeff

-Original Message-
From: avi.e.gr...@gmail.com  
Sent: Sunday, June 4, 2023 9:58 PM
To: 'Jeff Reichman' ; r-help@r-project.org
Subject: RE: [R] Adding a numeric class to a data.frame

Jeff,

The number of items is not relevant except insofar as your vector of
probabilities is in the same order as the other vector and the same length.

If for example you had a vector of test scores for 10,000 tests and you
calculated the probability in the data of having a 100, then the probability
of a 99 and so on, then you could make another vector of 10,000 giving the
probability of the corresponding entries.

So before calling ggplot, assuming you have two vectors called orig and
prob, you make a data.frame like

Df <- data.frame(orig=orig, prob=prob)

You use that in ggplot.

You can of course add additional columns. Or if your data is in another
format, do things like long to wide conversion and many other things.

If you already have a data.frame with one or more columns including orig,
you can attache the probabilities with something as simple as:

Df$prob = prob

If you are using ggplot, you may as well be using elements of the tidyverse
that provide a different take on how to do some things compared to base R
but that is not something easily discussed here.



-Original Message-
From: Jeff Reichman 
Sent: Sunday, June 4, 2023 10:21 PM
To: avi.e.gr...@gmail.com; r-help@r-project.org
Subject: RE: [R] Adding a numeric class to a data.frame

Yes - I could have done that but I have over 5,000 calculated probabilities.
So yes a little more detail would have helped. I'm needing to add those
probability back into the original data.frame from which the model was
created as I'm going  to be using ggplot2 so I need the probabilities and
original dataframe to be one.

-Original Message-
From: avi.e.gr...@gmail.com 
Sent: Sunday, June 4, 2023 9:00 PM
To: 'Jeff Reichman' ; r-help@r-project.org
Subject: RE: [R] Adding a numeric class to a data.frame

Jeff R, it would be helpful if your intent was understood.

For example, did you want output as a column of labels c("A", "B", "C") and
another adjacent of c(0.0011566127, 0.0009267028, 0.0081623324) then you
could do:

data.frame(labels=c("A", "B", "C"), data=c(0.0011566127, 0.0009267028,
0.0081623324))
  labels data
1  A 0.0011566127
2  B 0.0009267028
3  C 0.0081623324

If you wanted your columns labeled with the data in multiple columns, try
this:

> result <- data.frame(t(c(0.0011566127, 0.0009267028, 0.0081623324))) 
> result
   X1   X2  X3
1 0.001156613 0.0009267028 0.008162332
> names(result) <- c("A", "B", "C")
> result
AB   C
1 0.001156613 0.0009267028 0.008162332

But these are not solutions to your specified problem unless you explain
properly what you want to do and the exact expected output.



-Original Message-
From: R-help  On Behalf Of Jeff Reichman
Sent: Sunday, June 4, 2023 7:11 PM
To: r-help@r-project.org
Subject: [R] Adding a numeric class to a data.frame

R-Help Community

 

How do I add a numeric class to a data .frame. 

 

For example, I have calculated the following probabilities

 

   123

0.0011566127 0.0009267028 0.0081623324

 

How would I add them back into my data.frame for example

 

My_df <- data.frame(col_1 = c('A', 'B', 'C')) such that I end up with

 

col_1   col_2

A  0.0011566127

 

Though I could use a cbind.

 

Jeff


[[alternative HTML version deleted]]

__
R-help@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.

__
R-help@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.


Re: [R] error in arfima...

2023-06-05 Thread Martin Maechler


> Dear Martin,
>  REgrets to reply this late

> I am staring at a conundrum never before encountered in my experience with R:

> LYGH[[201]]
> [1] 45.40  3.25  6.50  2.15
> > arfima(LYGH[[201]])
>  Error in .fdcov(x, fdf$d, h, nar = nar, nma = nma, hess = hess, fdf.work = 
> fdf$w) :
> NA/NaN/Inf in foreign function call (arg 5)
> > arfima(c(45.40,3.25,6.50,2.15))

> Call:
>   arfima(y = c(45.4, 3.25, 6.5, 2.15))

> Coefficients:
>d
> 4.583013e-05
> sigma[eps] = 18.01252
> a list with components:
>  [1] "log.likelihood"  "n"   "msg" "d"   
> "ar"
>  [6] "ma"  "covariance.dpq"  "fnormMin""sigma"   
> "stderror.dpq"
> [11] "correlation.dpq" "h"   "d.tol"   "M"   
> "hessian.dpq"
> [16] "length.w""residuals"   "fitted"  "call"
> "x"
> [21] "series"

> Please note that the index of LYGH has changed from 202 to 201 due to some 
> randomness in one of my function.

> PLEASE HELP.

> Output of dput LYGH[[201]]:

> > dput(LYGH[[201]])
> c(45.4, 3.25, 6.5, 2.149998)

> output of session info()

> sessionInfo()
> R version 4.1.2 (2021-11-01)
> Platform: x86_64-w64-mingw32/x64 (64-bit)
> Running under: Windows Server x64 (build 14393)

> Matrix products: default

> locale:
> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252
> [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
> [5] LC_TIME=English_United States.1252

> attached base packages:
> [1] parallel  stats graphics  grDevices utils datasets  methods   base

> other attached packages:
> [1] pbmcapply_1.5.1 imputeTS_3.3forecast_8.17.0

> loaded via a namespace (and not attached):
>  [1] Rcpp_1.0.7urca_1.3-3pillar_1.9.0  compiler_4.1.2
> tseries_0.10-51
>  [6] tools_4.1.2   xts_0.12.1nlme_3.1-153  lifecycle_1.0.3   
> tibble_3.2.1
> [11] gtable_0.3.3  lattice_0.20-45   pkgconfig_2.0.3   rlang_1.1.0   
> cli_3.6.1
> [16] rstudioapi_0.14   curl_4.3.2xml2_1.3.3dplyr_1.1.1   
> generics_0.1.3
> [21] vctrs_0.6.1   gridtext_0.1.5ggtext_0.1.2  lmtest_0.9-40 
> grid_4.1.2
> [26] nnet_7.3-16   tidyselect_1.2.0  glue_1.6.2R6_2.5.1  
> fansi_1.0.4
> [31] ggplot2_3.4.2 TTR_0.24.3magrittr_2.0.3scales_1.2.1  
> quantmod_0.4.20
> [36] timeDate_4021.106 colorspace_2.1-0  fracdiff_1.5-1quadprog_1.5-8
> utf8_1.2.3
> [41] stinepack_1.4 munsell_0.5.0 zoo_1.8-10


> PLease Also note:

> arfima(c(45.4, 3.25, 6.5, 2.149998))

> Call:
>   arfima(y = c(45.4, 3.25, 6.5, 2.149998))

> Coefficients:
>d
> 4.583013e-05
> sigma[eps] = 18.01252
> a list with components:
>  [1] "log.likelihood"  "n"   "msg" "d"   
> "ar"
>  [6] "ma"  "covariance.dpq"  "fnormMin""sigma"   
> "stderror.dpq"
> [11] "correlation.dpq" "h"   "d.tol"   "M"   
> "hessian.dpq"
> [16] "length.w""residuals"   "fitted"  "call"
> "x"
> [21] "series"


> Many thanks in advance

> Thanking you,
> Yours sincerely,
> AKSHAY M KULKARNI

Hmm... indeed, "conundrum" may be a euphemism for the
situation. which clearly points to a bug *somewhere*.
As your dput() shows, the argument *is* a simple vector .. and
even if the default dput() may loose a few bits in
precison... you did show that with (possibly only almost)
identical argument, the error did not happen.

I really have no idea what's going on, 
Some musing/ideas: the  NA/NaN/Inf  warning
may come from a memory corruption problem somewhere because some
of the involved packages using compiled code or the old version of R/lapack/??? 
or ??? cause it.

Does the error only happen occasionally?
If you "randomly" do a few calls of either
  arfima(c(45.4, 3.25, 6.5, 2.149998))
or
  arfima(LYGH[[201]])
do you see "random" behavior? [if yes; this confirms typically
memory protection/allocation/... bugs]

fracdiff itself has also been updated (to 1.5-2) but that was really only
a compiler warning, not a bug fix, and I cannot imagine that
that makes the difference.

I think you should consider let your 'Windows Server' provider
update R on that server.  Notably the Windows version of R has
had problems fixed in the mean time ..
and at least there's a hope the problem disappears.

Lastly (but probably not helping more), you could use
dput() with control="digits"  and even
.Internal(inspect( * ))  magic on your  LYGH[[201]]

When I use simple numeric vectors "like" your LYGH[..], I get

> dput(c(45.4, 3.25, 6.5, 2.15), control="digits")
 c(45.399, 3.25, 6.5, 2.1499)

> .Internal(inspect(c(45.4, 3.25, 6.5, 2.15)) + ) 
@9874728 14 REALSXP g0c3 [] (len=4, tl=0) 45.4,3.25,6.5,2.15
>

Martin


> 
> From: Martin