search for: h_gurbux

Displaying 14 results from an estimated 14 matches for "h_gurbux".

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[,
2024 Nov 05
0
lattice subscripts with both condition and group
How can I use subscripts to draw the last graph with one call to ? ? ? ? ? ? ? ? ? ? ? ?? function xyplot()? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Thanks, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Naresh ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
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,
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
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,
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 Feb 02
1
R CMD check error: File `inconsolata.sty' not found
R CMD check <package> gives me below message at the end. There does not seem to be a problem with my TeX installation. Is it possible that R CMD check is not looking in the correct location? How can this problem be fixed? Thanks, Naresh * checking PDF version of manual ... WARNING LaTeX errors when creating PDF version. This typically indicates Rd problems. LaTeX errors found: ! LaTeX
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
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 Feb 08
0
R CMD check error: File `inconsolata.sty' not found
...re 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-a...
2024 Sep 22
2
store list objects in data.table
...olynomial > ## 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(...
2025 Jan 28
1
R CMD check says no visible binding for global variable
...ps://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...
2025 Jan 28
2
R CMD check says no visible binding for global variable
...;) 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...