search for: naresh_gurbuxani

Displaying 19 results from an estimated 19 matches for "naresh_gurbuxani".

2023 Jan 27
3
implicit loop for nested list
> > I am looking for a more elegant way to write below code. > > #Simulation results have different dimensions > mysim <- lapply(1:10, function(y) { > two.mat <- matrix(rnorm(4), nrow = 2) > four.mat <- matrix(rnorm(16), nrow = 4) > list(two.mat = two.mat, four.mat = four.mat) #results with different dimensions > }) > > #Collect different
2025 Jan 14
1
Need help with time series
...NA NA NA NA NA NA NA NA NA NA [121] NA -1458 NA NA NA NA NA NA NA NA [131] NA NA I'm not familiar enough with TS to know how you make them 31d month units... On Tue, 14 Jan 2025, 23:08 Naresh Gurbuxani, <naresh_gurbuxani at hotmail.com> wrote: > For below data, I find strange results in basic time series analysis. Why > does acf() function find missing values? When crossprod(xmat) is > invertible, why does arima() find system exactly singular? > > Thanks, > Naresh > > x <- c(24957,...
2023 Jan 27
1
implicit loop for nested list
...a matrix-list. You can slice this matrix-list just like normal, then cbind it in one step: ``` two.mat <- do.call("cbind", mysim["two.mat", ]) four.mat <- do.call("cbind", mysim["four.mat", ]) ``` On Thu, Jan 26, 2023 at 10:33 PM Naresh Gurbuxani <naresh_gurbuxani at hotmail.com> wrote: > > > > > I am looking for a more elegant way to write below code. > > > > #Simulation results have different dimensions > > mysim <- lapply(1:10, function(y) { > > two.mat <- matrix(rnorm(4), nrow = 2) > > four.mat...
2025 Jan 28
2
R CMD check says no visible binding for global variable
...gthen ;) John Get Outlook for iOS<https://aka.ms/o0ukef> ________________________________ From: R-help <r-help-bounces at r-project.org> on behalf of avi.e.gross at gmail.com <avi.e.gross at gmail.com> Sent: Tuesday, January 28, 2025 12:01:25 AM To: 'Naresh Gurbuxani' <naresh_gurbuxani at hotmail.com>; r-help at r-project.org <r-help at r-project.org> Subject: Re: [R] R CMD check says no visible binding for global variable Naresh, I am not sure how you are creating your data.frame so it has no, I think, column names. There are two scenarios including one where it is no...
2024 Sep 22
2
store list objects in data.table
...e 2 polynomial > ## is the same as > result[[c(2,2)]] ## this is a bit easier for me to groc. > > Again, feel free to ignore without replying if my gratuitous remarks > are unhelpful. > > Cheers, > Bert > > > On Sat, Sep 21, 2024 at 2:25?PM Naresh Gurbuxani > <naresh_gurbuxani at hotmail.com> wrote: >> I am trying to store regression objects in a data.table >> >> df <- data.frame(x = rnorm(20)) >> df[, "y"] <- with(df, x + 0.1 * x^2 + 0.2 * rnorm(20)) >> >> mydt <- data.table(mypower = c(1, 2), myreg = list(lm(y ~...
2023 Nov 18
1
combine barchart and xyplot in lattice
On Sat, 18 Nov 2023 at 06:44, Naresh Gurbuxani <naresh_gurbuxani at hotmail.com> wrote: > > In below graph, I would like to add two vertical lines using > panel.abline(). Is this possible? I assume you want the 'v' variable in panel.abline() to be interpreted in the context of your x-axis, which here represents a factor variable. Unless two...
2024 Sep 22
1
store list objects in data.table
...ple: result[[2]][[2]] ## the reg component of the degree 2 polynomial ## is the same as result[[c(2,2)]] ## this is a bit easier for me to groc. Again, feel free to ignore without replying if my gratuitous remarks are unhelpful. Cheers, Bert On Sat, Sep 21, 2024 at 2:25?PM Naresh Gurbuxani <naresh_gurbuxani at hotmail.com> wrote: > > I am trying to store regression objects in a data.table > > df <- data.frame(x = rnorm(20)) > df[, "y"] <- with(df, x + 0.1 * x^2 + 0.2 * rnorm(20)) > > mydt <- data.table(mypower = c(1, 2), myreg = list(lm(y ~ x, data = df), &gt...
2024 Sep 21
3
store list objects in data.table
I am trying to store regression objects in a data.table df <- data.frame(x = rnorm(20)) df[, "y"] <- with(df, x + 0.1 * x^2 + 0.2 * rnorm(20)) mydt <- data.table(mypower = c(1, 2), myreg = list(lm(y ~ x, data = df), lm(y ~ x + I(x^2), data = df))) mydt #?? mypower??? myreg #???? <num>?? <list> #1:?????? 1 <lm[12]> #2:?????? 2 <lm[12]> But mydt[1, 2]
2025 Jan 28
1
R CMD check says no visible binding for global variable
...gthen ;) John Get Outlook for iOS<https://aka.ms/o0ukef> ________________________________ From: R-help <r-help-bounces at r-project.org> on behalf of avi.e.gross at gmail.com <avi.e.gross at gmail.com> Sent: Tuesday, January 28, 2025 12:01:25 AM To: 'Naresh Gurbuxani' <naresh_gurbuxani at hotmail.com>; r-help at r-project.org <r-help at r-project.org> Subject: Re: [R] R CMD check says no visible binding for global variable Naresh, I am not sure how you are creating your data.frame so it has no, I think, column names. There are two scenarios including one where it is no...
2025 Jan 28
1
R CMD check says no visible binding for global variable
...utlook for iOS<https://aka.ms/o0ukef> > ________________________________ > From: R-help <r-help-bounces at r-project.org> on behalf of avi.e.gross at gmail.com <avi.e.gross at gmail.com> > Sent: Tuesday, January 28, 2025 12:01:25 AM > To: 'Naresh Gurbuxani' <naresh_gurbuxani at hotmail.com>; r-help at r-project.org <r-help at r-project.org> > Subject: Re: [R] R CMD check says no visible binding for global variable > > Naresh, > > I am not sure how you are creating your data.frame so it has no, I think, column names. There are two scenarios inc...
2024 Sep 28
1
lattice xyplot with cumsum() function inside
This code gives unexpected result. library(data.table) library(lattice) set.seed(123) mydt <- data.table(date = seq.Date(as.IDate("2024-01-01"), by = 1, length.out = 50), xgroup = "A", x = runif(50, 0, 1)) mydt <- rbindlist(list(mydt, data.table(date = mydt$date, xgroup = "B", x = runif(50, 0, 3)))) mydt[, `:=`(xcumsum = cumsum(x)), by = .(xgroup)] mydt[,
2025 Jan 29
0
R CMD check says no visible binding for global variable
...unctions you think caused the problem. You could also wrap all the code in a function and use the debugger to step through that (which may help if the error occurs in an iteration of a loop body). Regards, Jorgen Harmse. Message: 1 Date: Mon, 27 Jan 2025 22:46:21 +0000 From: Naresh Gurbuxani <naresh_gurbuxani at hotmail.com> To: "r-help at r-project.org" <r-help at r-project.org> Subject: [R] R CMD check says no visible binding for global variable Message-ID: <IA1P223MB0499637A346D65F7B4C2EA8CFAEC2 at IA1P223MB0499.NAMP223.PROD.OUTLOOK.COM> Content-Type: text/plain; cha...
2025 May 22
1
R session dies on lattice::show.settings()
I used Anaconda to install R on my Windows pc. From lattice package, show.settings() function causes R session to end. How can this problem be analysed? Sent from my iPhone ? > library(lattice) > sessionInfo() R version 4.1.3 (2022-03-10) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 22631) Matrix products: default locale: [1] LC_COLLATE=English_United
2025 Jan 28
1
R CMD check says no visible binding for global variable
...t;https://aka.ms/o0ukef> >> ________________________________ >> From: R-help <r-help-bounces at r-project.org> on behalf of avi.e.gross at gmail.com <avi.e.gross at gmail.com> >> Sent: Tuesday, January 28, 2025 12:01:25 AM >> To: 'Naresh Gurbuxani' <naresh_gurbuxani at hotmail.com>; r-help at r-project.org <r-help at r-project.org> >> Subject: Re: [R] R CMD check says no visible binding for global variable >> Naresh, >> I am not sure how you are creating your data.frame so it has no, I think, column names. There are two scenarios inc...
2023 Nov 18
1
combine barchart and xyplot in lattice
In below graph, I would like to add two vertical lines using panel.abline(). ?Is this possible? Thanks, Naresh mydf <- data.frame(hour = rep(6:20, 2), traffic = c(round(dnorm(6:20, 9, 3) * 10000), round(dnorm(6:20, 17, 4) * 10000)), direction = rep(c("inbound", "outbound"), c(15, 15))) vehicles <- data.frame(hour = 6:20, count = c(100, 120, 140, 125, 105, 80, 70, 75,
2025 Jan 28
2
R CMD check says no visible binding for global variable
...t;https://aka.ms/o0ukef> >> ________________________________ >> From: R-help <r-help-bounces at r-project.org> on behalf of avi.e.gross at gmail.com <avi.e.gross at gmail.com> >> Sent: Tuesday, January 28, 2025 12:01:25 AM >> To: 'Naresh Gurbuxani' <naresh_gurbuxani at hotmail.com>; r-help at r-project.org <r-help at r-project.org> >> Subject: Re: [R] R CMD check says no visible binding for global variable >> Naresh, >> I am not sure how you are creating your data.frame so it has no, I think, column names. There are two scenarios inc...
2025 Jan 14
1
Need help with time series
For below data, I find strange results in basic time series analysis. Why does acf() function find missing values? When crossprod(xmat) is invertible, why does arima() find system exactly singular? Thanks, Naresh x <- c(24957, 10577, -18516, 2940, -1458, 32704, -26697, -46902, 48413, -11937, 2043, 26431, -55336, -16838, 89651, 25363, -50388, -41012, -28242, -18213, 58759, -15290, -7413,
2025 Jan 28
1
R CMD check says no visible binding for global variable
Naresh, I am not sure how you are creating your data.frame so it has no, I think, column names. There are two scenarios including one where it is not really a valid data.frame and one where it can be handled before any other use as shown below. If it cannot be used, you might need to modify how your SQL or the function you call creates it so it includes either names it chooses or that you supply.
2025 Feb 08
0
R CMD check error: File `inconsolata.sty' not found
...Ensure that, in PATH variable, desired tex installation comes first. 3. Verify that different tex family commands use the same tex installation. For example, tlmgr - - version, tex - - version, should both point to the same installation. > On Feb 2, 2025, at 11:31?AM, Naresh Gurbuxani <naresh_gurbuxani at hotmail.com> wrote: > > This did not help. I removed inconsolata.sty, then reinstalled inconsolata. > > bash-3.2$ sudo tlmgr install -reinstall inconsolata > Password: > Sorry, try again. > Password: > tlmgr: package repository https://ctan.tinycomputers.io/tex-arch...