search for: gurbuxani

Displaying 20 results from an estimated 23 matches for "gurbuxani".

2025 Jan 28
2
R CMD check says no visible binding for global variable
...ents? Setting it to NULL unconditionally could mess up some programs. There are ways to set it conditionally and save the previous value and restore it after but this gets to be lots more work ... -----Original Message----- From: R-help <r-help-bounces at r-project.org> On Behalf Of Naresh Gurbuxani Sent: Tuesday, January 28, 2025 4:25 PM To: Duncan Murdoch <murdoch.duncan at gmail.com> Cc: r-help at r-project.org Subject: Re: [R] R CMD check says no visible binding for global variable This solution worked. Thanks Sent from my iPhone > On Jan 28, 2025, at 3:09?PM, Duncan Murdoch &l...
2025 Jan 28
1
R CMD check says no visible binding for global variable
This solution worked. Thanks Sent from my iPhone > On Jan 28, 2025, at 3:09?PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > > ?On 2025-01-28 1:55 p.m., Naresh Gurbuxani wrote: >> Data.frame is returned by SQL query. It does have column names. In the function, I make small changes to some columns. >> Something like: >> Myquery <- ?SELECT date, price, stock FROM stocktab WHERE stock = ?ABC? AND date > ?2025-01-01?;? >> Prices <- db...
2025 Jan 28
1
R CMD check says no visible binding for global variable
On 2025-01-28 1:55 p.m., Naresh Gurbuxani wrote: > Data.frame is returned by SQL query. It does have column names. In the function, I make small changes to some columns. > > Something like: > > Myquery <- ?SELECT date, price, stock FROM stocktab WHERE stock = ?ABC? AND date > ?2025-01-01?;? > > Prices <-...
2025 Jan 28
2
R CMD check says no visible binding for global variable
...again helping strengthen ;) 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 in...
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 28
1
R CMD check says no visible binding for global variable
...again helping strengthen ;) 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 in...
2024 Sep 22
2
store list objects in data.table
...ponent 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(...
2025 Jan 28
1
R CMD check says no visible binding for global variable
...our data.frame is called. So the code to add names for columns looks like: > colnames(mydata) <- paste0("temp", 1:ncol(mydata)) > mydata temp1 temp2 temp3 1 1 2 3 -----Original Message----- From: R-help <r-help-bounces at r-project.org> On Behalf Of Naresh Gurbuxani Sent: Monday, January 27, 2025 5:46 PM To: r-help at r-project.org Subject: [R] R CMD check says no visible binding for global variable I have written a function which returns an SQL query result as a data.frame. Each column of data.frame is a variable not explicitly defined. For every column na...
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 29
0
R CMD check says no visible binding for global variable
Hi Naresh Gurbuxani, There are already several answers dealing with the specific code that you wrote, but my reaction is to step back a little. R CMD ? starts an R session but takes standard input from a file. (In Unix-like systems you might even be able to make an R script into an executable file.) I think it even...
2023 Jan 27
1
implicit loop for nested list
...hould give you 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) &...
2025 Jan 27
2
R CMD check says no visible binding for global variable
I have written a function which returns an SQL query result as a data.frame. Each column of data.frame is a variable not explicitly defined. For every column name, R CMD check says ?no visible binding for global variable <name>. Status: 1 NOTE Is it possible to tell R CMD check that these variables are OK? Thanks, Naresh Sent from my iPhone
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...
2024 Sep 22
1
store list objects in data.table
...39;s. For example: 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...
2025 Jan 14
1
Need help with time series
...A NA [111] 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 >...
2024 May 09
2
Strange variable names in factor regression
On converting character variables to ordered factors, regression result has strange names. Is it possible to obtain same variable names with and without intercept? Thanks, Naresh mydf <- data.frame(date = seq.Date(as.Date("2024-01-01"), as.Date("2024-03-31"), by = 1)) mydf[, "wday"] <- weekdays(mydf$date, abbreviate = TRUE) mydf.work <- subset(mydf, !(wday
2025 Feb 08
0
R CMD check error: File `inconsolata.sty' not found
...e another. 2. 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.tiny...
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 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
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,