Hi Shawn,
Here is a solution using base R (no dplyr). The only regex appears in the
statement to get the common prefixes.
colsPrefixes <- sub("_Planned$","",colnames(gross_test)[
grep("_Planned$",colnames(gross_test))])
f <- function(s) {
gross_test[,paste(s,"Diff",sep="_")] <<-
gross_test[,past
Here is a different approach that does not involve dplyr or the creation of
the intermediate data frame 'controls'
f <- function(v) {
any(v %in% c("E109","E119","E149")) & any(v %in% c("Caucasian")) &
any(v %in% c("No kinship found","Ten or more third-degree relatives
identified"))
}
tot$co
Chapeau Ista :-)
On Tue, Aug 13, 2019 at 4:22 PM Ista Zahn wrote:
> How about
>
> > library(tidyr)
> > separate_rows(d, Col2)
> Col1 Col2
> 1 Agency A Function1
> 2 Agency A Function2
> 3 Agency A Function3
> 4 Agency A Function4
> 5 Agency B Function2
> 6 Agency B Function4
> 7 Agenc
Hi Phil,
Please resubmit your question with the data frame contents shown as the
output from the command
dput(t1.txt). This will make it easier for people to run your reprex and
respond to your question.
Best,
Eric
On Sun, Aug 25, 2019 at 5:26 AM wrote:
> I am having difficulty with a chart u
0.4, 0.2, 0.7, 0.3,
> 0.3, 0.3, 0.4, 0.3, 0.2, 0.6, 1, 1.1, 0.3, 0.4, 0.4, 0.6,
> 0.5, 0.1, 0.1, 0.9, 2.3, -1.2, -1, 0.9, 0.8, 0.6, 0.3, 0.8,
> 0.1, 0.8, 0.7, 0.6, 0.7, 0.7, 0.4, 0.4, 0.3, 0.3, 0.5, 0.2,
> 0.2, 1.7, 0.1, 0.3, 1.1, 0.4, 0.2, 0.1, 0, 0.6, 0.6, 0.8,
&g
Rich writes: " I've been out of academia for a very long time ... "
He may not be aware that currently authors are encouraged to support
reproducible research, which includes making available (where possible)
both the data and the software programs that were used in the analysis.
I think the OP's s
dtV <- seq(from=as.Date("1975-01-01"),by='1 month',length=372)
x$dt <- dtV[x$id]
HTH,
Eric
On Mon, Sep 2, 2019 at 8:36 PM Miluji Sb wrote:
> Dear all,
>
> I have a panel data with a large number of groups and the cumulative number
> of months (1 - 372) for January 1995 to December 2005. My goa
Can you create a reproducible example?
You don't show: income, atv, sktaxb, sktax
On Thu, Sep 12, 2019 at 12:04 PM wrote:
> Here is are a few lines of my R session:
>
> > class(income)
> [1] "integer"
> > class(sapply(1000*income-999,atv,sktaxb,sktax))
> [1] "numeric"
> > class(sapply(1000*inc
Hi Malte,
I only skimmed your question and looked at the desired output.
I wondered if the apply function could meet your needs.
Here's a small example that might help you:
m <- matrix(1:9,nrow=3)
m <- cbind(m,apply(m,MAR=1,mean)) # MAR=1 says to apply the function
row-wise
m
# [,1] [,2]
23.09.2019 um 09:32 schrieb Eric Berger :
>
> Hi Malte,
> I only skimmed your question and looked at the desired output.
> I wondered if the apply function could meet your needs.
> Here's a small example that might help you:
>
> m <- matrix(1:9,nrow=3)
> m <- cbind(m,
https://cran.r-project.org/web/packages/qvalue/index.html
states
Package ‘qvalue’ was removed from the CRAN repository.
Just an FYI
On Tue, Sep 24, 2019 at 6:48 PM Ana Marija
wrote:
> Hello,
>
> I tried using qvalue function:
>
> library(qvalue)
> qval_obj=qvalue(pvalR)
> pi1=1-qval
Hi Faradj,
Suppose your data frame is labeled 'a'. Then the following seems to do what
you want.
v <- rep(NA_integer_,max(a$country_code))
v[ a$country_code[a$x==1] ] <- a$year[a$x==1]
a$treatment <- sapply( 1:nrow(a), function(i) { a$year[i] -
v[a$country_code[i]]})
HTH,
Eric
On Thu, Oct 3, 20
,
> Faradj
>
>
> > 3 okt. 2019 kl. 15:18 skrev Eric Berger :
> >
> > Hi Faradj,
> > Suppose your data frame is labeled 'a'. Then the following seems to do
> what you want.
> >
> > v <- rep(NA_integer_,max(a$country_code))
> > v[ a$c
Best,
> Faradj
>
>
> > 3 okt. 2019 kl. 16:11 skrev Eric Berger :
> >
> > Hi Faradj,
> > What should the treatment variable be in those cases? If you want to set
> it to a constant y (such as y=0), you can add something like
> >
> > y <- 0
> > a$
For general documentation about the effsize package you would do:
> help(package="effsize")
For information on calculations related to vargha:
>??vargha
This command displays effsize::VD.A, which you can find out about via the
command
>?effsize::VD.A
This displays the documentation for the functio
excel and we read it in code with read.csv.
>
> Best regards
>
> On Friday, October 4, 2019, Eric Berger wrote:
>
>> For general documentation about the effsize package you would do:
>> > help(package="effsize")
>>
>> For information on calculat
Here is one way
A <- sapply(1:ncol(A), function(i) {A[,i][B[,i]]})
On Fri, Oct 11, 2019 at 12:44 PM Jinsong Zhao wrote:
> Hi there,
>
> I have two matrices, A and B. The columns of B is the index of the
> corresponding columns of A. I hope to rearrange of A by B. A minimal
> example is followin
I did a Google search on
R plot superscript in legend
and the first search result was
https://stackoverflow.com/questions/20453408/superscript-r-squared-for-legend
which looks like it might address your question.
On Sun, Oct 20, 2019 at 3:30 PM Patrick Giraudoux <
patrick.giraud...@univ-fcomte
You might improve your chances for getting a response by supplying
a minimal reproducible example. Remember to include all the library()
commands
showing which packages you are using.
On Mon, Oct 21, 2019 at 2:53 PM Luigi Marongiu
wrote:
> Hello,
> I am using the package vegan to generate raref
I think your code is a bit buggy. Try this
for(i in 2:length(l)) {
allF <- merge(allF, l[[i]], by= "row.names", all.x= F, all.y= F)
rownames(allF) <- allF$Row.names
allF <- allF[,-1]
}
HTH,
Eric
On Tue, Nov 5, 2019 at 6:16 PM Ana Marija
wrote:
> Hi,
>
> I have 3 data frames like this:
> set.seed(1)
> m <- matrix(rnorm(500),ncol=2)
> cor(m)
# [,1] [,2]
# [1,] 1. 0.04060113
# [2,] 0.04060113 1.
> options(digits=12)
> cor(m)
# [,1][,2]
# [1,] 1.0 0.0406011304584
# [2,] 0.0406011304584 1.0
HTH,
Hi Jeff,
You might want to check out the microbenchmark() function in the
microbenchmark package.
install.packages("microbenchmark")
library(microbenchmark)
?microbenchmark
HTH,
Eric
On Wed, Nov 20, 2019 at 5:45 PM Jeff Reichman
wrote:
> R- Help
>
>
>
> Is there a command or way to obtain the
Hi Thomas,
As Jeff wrote, your HTML email is difficult to read. This is a "plain
text" forum.
As for "pointers", here is one suggestion.
Since you write that you can do the necessary actions with a specific
file, try to write a function that carries out those actions for that
same file.
Except when
Hi Mayooran,
If you define the following function
f <- function(m,v) { sprintf("Norm(mu=%.1f, var=%.1f)",m,v) }
Then you can modify the setting of Prob as follows
Prob <- plyr::rename(Prob_df,
c("p_1"=f(mu1,var1),"p_2"=f(mu2,var2),"p_3"=f(mu3,var3)))
The lesson here is that wherever you set a
Continuing with Jeff's point: do you know for certain that the serial
number in row 5 of one file corresponds to the 'work order number' in row 5
of a different file?
Ideally this could be verified based on some sort of identifier that
appears as a column in both files and you could match up corres
Here is the code of a reproducible example:
foo <- setRefClass("foo",
fields=list(x="numeric"),
methods=list(
initialize=function(a) {
x <<- a
},
funcA=function(f)
Here is the modified code of the reproducible example I sent previously.
Notice the .self$ prefix to funcB which is what has changed
foo <- setRefClass("foo",
fields=list(x="numeric"),
methods=list(
initialize=function(a) {
Hi Bob,
You wrote "the following error message" -
when in fact it is a Warning and not an error message. I think your
code does what you hoped it would do, in the sense it successfully
calculates the sqrt(abs(negativeNumber)), where appropriate.
If you want to run the code without seeing this warn
summary(gnul)
shows the std error of the coefficient estimate
On Mon, Dec 9, 2019 at 5:16 PM Marc Girondot via R-help
wrote:
>
> Let do a simple glm:
>
> > y=rnorm(100)
> > gnul <- glm(y ~ 1)
> > gnul$coefficients
> (Intercept)
>0.1399966
>
> The logLik shows the fit of two parameters (DF
Hi Sarah,
I looked at the documentation that you linked to. It contains the step
text_df <- tibble(line = 1:4, text = text)
before it does the step
text_df %>%
unnest_tokens(word, text)
So you may be missing a step.
Best,
Eric
On Tue, Dec 10, 2019 at 9:05 PM Sarah Payne wrote:
>
> Hi--I'm
Apparently it does not like that the fact that your user 'David
Stevens' has a blank.
Looking at the documentation ?install.packages
it seems that if you modify your call to something like
install.packages('callr',destdir='C:\tmp')
you might be ok. (caveat: I did not try this)
You should make th
e ‘callr’ had non-zero exit status
>
> I also tried
>
> install.packages('callr',lib='c:/myRLib',destdir='c:/myRLib')
>
> with the same result. There's something more here that I'm unable to discover.
>
> Best
> David
> On 12/12/20
gt;
> > Thanks Eric - I'll follow up with this link. I'd tried some of these
> > things before but I'll keep after it.
> >
> > Best
> >
> > David
> >
> > On 12/12/2019 9:52 AM, Eric Berger wrote:
> > > Actually there was progress as afte
It is fairly easy to incorporate C++ code into R programs using the
Rcpp package.
Definitely worth the effort to learn how to do this.
On Sun, Dec 15, 2019 at 5:48 AM Boris Steipe wrote:
>
> See this thread why that's a bad idea ...
> https://stackoverflow.com/questions/26080716/merge-sort-in-r
And similar to my response to the C++ question you posted, it is
possible to incorporate Python code into R programs using the
reticulate package.
On Sun, Dec 15, 2019 at 5:58 AM Boris Steipe wrote:
>
> See my response to the C++ question you posted a minute later.
>
> B.
>
>
>
>
> > On 2019-12-1
Assuming the vignettes are the same in both cases, try going back to
the system where it worked and introduce a single change? i.e.
a) previous linux system and R 4.2
b) Previous R version and Oracle Linux 8
Repeat the test for a) and b) and if one works fine and the other
fails at least that will
Hi,
One problem you have is with the command:
regr<-randomForest(y~x1+x2, data=X_train, proximity=TRUE)
What you need is something like this:
X2 <- cbind(X,y)
regr<-randomForest(y~x1+x2, data=X2, proximity=TRUE)
HTH,
Eric
On Mon, May 8, 2023 at 11:11 PM varin sacha via R-help
wrote:
>
> Dear
X_test)
HTH,
Eric
On Tue, May 9, 2023 at 6:40 AM Eric Berger wrote:
> Hi,
> One problem you have is with the command:
> regr<-randomForest(y~x1+x2, data=X_train, proximity=TRUE)
>
> What you need is something like this:
>
> X2 <- cbind(X,y)
> regr<-randomFo
An alternative that does not use the zoo package but uses the built-in
constant month.abb
df1 <- data.frame(Year = c(2021, 2021, 2021),
Mon = c("Mar", "Jan", "Apr"))
df1$mon_year <- df1$Year*100 + sapply(df1$Mon, \(x) match(x,month.abb))
sort(df1$mon_year)
On Wed, May 17, 202
How about this:
a <- cbind(AirPassengers, diff(log(AirPassengers)),
diff(diff(log(AirPassengers
colnames(a)[2:3] <- c("percent increase", "acceleration")
plot(a, xlab="year", main="AirPassengers")
HTH,
Eric
On Mon, May 29, 2023 at 7:57 AM Spencer Graves
wrote:
>
> Hello, All:
>
>
>
Untested but why not
a <- cbind(log(DAX), exp(diff(log(DAX))), exp(diff(diff(log(DAX)
colnames(a) <- c("logDAX", "vel", "accel")
plot(a)
On Tue, May 30, 2023 at 1:46 PM Spencer Graves
wrote:
>
>
>
> On 5/29/23 2:37 AM, Eric Berger wrote:
>
My code assumes that DAX is a ts object, as in your original post.
On Tue, May 30, 2023 at 2:06 PM Eric Berger wrote:
>
> Untested but why not
>
> a <- cbind(log(DAX), exp(diff(log(DAX))), exp(diff(diff(log(DAX)
> colnames(a) <- c("logDAX", "vel"
to plot,
and what would be the Y labels that you want to appear at those levels
(assuming that there was a
Y label for each of them - just to understand the units you are talking about)
On Tue, May 30, 2023 at 4:06 PM Spencer Graves
wrote:
>
>
>
> On 5/30/23 6:16 AM, Eric Berger wrote:
What if you just precede these commands as follows:
par(mfrow=c(3,1))
plot(DAX.[, 1], log='y', ylab='DAX')
plot(DAX.[, 2], ylab='vel (%)')
plot(DAX.[, 3], ylab='accel (%)')
On Tue, May 30, 2023 at 5:45 PM Spencer Graves
wrote:
>
>
>
> O
Slight modification to have the xaxt ticks and labels only appear on
the bottom chart
par(mfrow=c(3,1))
plot(DAX.[, 1], log='y', ylab='DAX', xaxt="n")
plot(DAX.[, 2], ylab='vel (%)', xaxt="n")
plot(DAX.[, 3], ylab='accel (%)')
On Tue,
27;)
On Wed, May 31, 2023 at 4:27 PM Spencer Graves
wrote:
>
>
>
> On 5/30/23 10:23 AM, Eric Berger wrote:
> > What if you just precede these commands as follows:
> >
> > par(mfrow=c(3,1))
> > plot(DAX.[, 1], log='y', ylab='DAX')
> >
Hi Akshay,
You do not have to quit R to run 'top'. You can have, for example, 2
windows, with R running in one and top running in the oher.
Eric
On Sat, Jun 10, 2023 at 12:19 AM akshay kulkarni
wrote:
> Dear Ivan,
> Thanks for the reply. I am pressurised by a fast
> approachin
Hi Javed,
grep returns the positions of the matches. See an example below.
> v <- c("abc", "bcd", "def")
> v
[1] "abc" "bcd" "def"
> grep("cd",v)
[1] 2
> w <- v[-grep("cd",v)]
> w
[1] "abc" "def"
>
On Tue, Jun 13, 2023 at 8:50 AM javad bayat wrote:
>
> Dear Rui;
> Hi. I used your codes, but it
you might want to search bioconductor
https://www.bioconductor.org/
https://bioconductor.org/books/3.13/OSCA.basic/feature-selection.html
On Fri, Jun 16, 2023 at 9:04 AM Andrew Zhang
wrote:
> Hello everyone, can someone share a list of packages that can do feature
> selection for multiclass (m
Hi Philip,
In the decades since you learned R there have been some additions to the
language.
In particular, R now supports lambda functions.
Applying this feature to Ivan's beautiful solution cuts down 7 characters
(continuing his golfing analogy)
unlist(lapply(seq_along(x), \(i) x[i] * x[-(1:i)]
Hi Murat,
I am not sure why you are using R 3.5.
CRAN has R 4.3.1
https://cran.r-project.org/bin/windows/base/
I suggest you start over and install R 4.3.1 and then your cytofkit
install might work.
Good luck,
Eric
On Fri, Aug 4, 2023 at 5:47 PM Murat DELMAN wrote:
>
> Dear Ms./Mr.,
>
>
> I s
Stacking columns of a matrix is a standard operation in multilinear
algebra, usually written as the operator vec().
I checked to see if there is an R package that deals with multilinear
algebra. I found rTensor, which has a function vec().
So, yet another way to accomplish what you want would be:
er answer.
>
> -Original Message-
> From: R-help On Behalf Of Eric Berger
> Sent: Sunday, August 6, 2023 3:34 AM
> To: Bert Gunter
> Cc: R-help Mailing List ; Steven Yen
> Subject: Re: [R] Stacking matrix columns
>
> Stacking columns of a matrix is a standard operatio
Hi Naresh,
Perhaps the below is faster than your approach
library(dplyr)
library(tidyr)
merge(option.trades, stock.trades, by="timestamp", all=TRUE) |>
dplyr::arrange(timestamp) |>
dplyr::mutate(stock.timestamp =
as.POSIXct(ifelse(is.na(option.price), timestamp, NA))) |>
tidyr::fill(stock.pr
Hi Akshay,
The forecast package will do the BoxCox transform and automatically
backtransform the forecasts.
The package also handles xts objects.
For example, modifying the example from the help page of
forecast::forecast for Arima
> dt <- as.Date("2023-01-01") + 1:length(WWWusage)
> a <- xts(WWWu
ote:
>
> Dear Eric,
> THanks for the reply...will this also work with arfima() ?
> What if I want to fit a model like GARCH and friends?
>
> THanking you,
> Yours sincerely,
> AKSHAY M KULKARNI
> ____
> From: Eric Berger
> Sent: Sunday, Augu
I copied your data and ran your code.
It worked fine for me.
> sessionInfo()
R version 4.3.1 (2023-06-16)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.2 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux
Hi Akshay,
I have never used this function before but according to ?lag.plot you
simply need to pass the argument do.lines=FALSE.
HTH,
Eric
On Mon, Aug 28, 2023 at 5:45 PM akshay kulkarni wrote:
>
> Dear members,
> I am using the following code:
>
> lag.plot(ygrpch(OHLC
The function purrr::cross() can help you with this. For example:
f <- function(states, nsteps, first, last) {
paste(first, unlist(lapply(purrr::cross(rep(list(v),nsteps-2)),
\(x) paste(unlist(x), collapse=""))), last, sep="")
}
f(LETTERS[1:5], 3, "B", "E")
[1] "BAE" "BBE" "BCE" "BDE" "BEE"
HTH
quot; "BEBD" "BACD" "BBCD" "BCCD" "BDCD" "BECD" "BADD"
>> [17] "BBDD" "BCDD" "BDDD" "BEDD" "BAED" "BBED" "BCED" "BDED"
>> [25]
;b" "c" "a" "e"
> [2,] "b" "d" "a" "e"
> [3,] "b" "e" "a" "e"
> [4,] "b" "a" "b" "e"
> [5,] "b" "c
xx <- pmax(x1,x2)
On Tue, Sep 5, 2023 at 11:56 AM roslinazairimah zakaria
wrote:
>
> Hi all,
>
> I have these data
>
> x1 <- c(116,0,115,137,127,0,0)
> x2 <- c(0,159,0,0,0,159,127)
>
> I want : xx <- c(116,115,137,127,159, 127)
>
> I would like to merge these data into one column. Whenever the da
As Duncan points out, ifelse() provides a more general approach than
the specific pmax().
Even more generally, you might want to consider the apply() function
(and its relatives sapply(), lapply(), ...)
For example
apply(cbind(x1,x2), MAR=1, max)
In the above statement, x1 and x2 are combined i
You might want to consider exponential smoothing models such as Holt's
(Double Exponential Smoothing).
This method continually updates the trend parameter, and you can
monitor the most recent value (for sign, or magnitude, or both).
In R, some choices to fit the Holt model:
1. stats::HoltWinters(
I asked your question to ChatGPT4
In statistics, what is the theta parameter of the negative binomial
distribution?
The response contained some math symbols but I am sending in plain
text mode so there may be some loss, hopefully not serious.
The negative binomial distribution is used to model t
Another approach (still seems to require experimentation to get the value
'2') would be to replace the annotate() with
geom_text(data=above_92, aes(x=eruptions,y=waiting, label=waiting),
nudge_y=2)
At least this makes clear the reason for the magic number '2' in the code.
For details see
?geom_t
Another direction would be to replace your R script (.R file) with a
Quarto document (.qmd file).
VS-code has good support for Quarto and you could intersperse your
Latex with R chunks.
On Wed, Nov 29, 2023 at 6:15 PM Ben Bolker wrote:
>
>
>
>Presumably there's nothing stopping you *writing*
Bert,
Posit (formerly RStudio) has moved from RMarkdown to Quarto. They
still support RMarkdown but major new features will be in Quarto. For
new users a better choice would be Quarto.
See https://quarto.org/docs/faq/rmarkdown.html
Secondly, the OP stated he was using the VS-Code IDE, so there is
full_filename <- paste(filepath, filename,sep="/")
On Sat, Dec 30, 2023 at 1:45 PM Andy wrote:
> Thanks Ivan and Calum
>
> I continue to appreciate your support.
>
> Calum, I entered the code snippet you provided, and it returns 'file
> missing'. Looking at this, while the object 'full_filename'
ull filename and
> # passes it ( |> command) to the next line
> # which summarises it.
> # the result is saved in a data frame object
> # called content which we shall show some
> # heading into from
>
> head(content)
> }
>
>
> Running this, results i
! # The rest here is Calum's
> > suggestion
> > if (!file.exists(full_filename)) {
> > message("File missing")
> > } else {
> > content <- read_docx(full_filename)
> > docx_summary()
> > # this reads docx for the full fil
According to https://cran.r-project.org/web/packages/genoPlotR/index.html
the maintainer of genoPlotR is
Lionel Guy
Send your question also to him.
On Tue, Apr 2, 2024 at 11:27 AM Luigi Marongiu wrote:
>
> I would like to use your genoPlotR package
> (doi:10.1093/bioinformatics/btq413) to comp
Since you are loading lubridate it is enough to do
Atest$ddate1 <- dmy(Atest$ddate)
On Sun, Jun 9, 2024 at 11:59 PM Duncan Murdoch wrote:
>
> On 2024-06-09 4:39 p.m., Val wrote:
> > HI all,
> >
> > My
> > I am trying to convert character date (mm/dd/yy) to -mm-dd date
> > format in one of
Please show the output of
> sessionInfo()
On Tue, Jun 18, 2024 at 7:49 PM Ogbos Okike
wrote:
> Thanks, Duncan for contributing. I quickly tried entering the command on a
> new line. But the error pointed specifically to the point. It didn't run.
> Best regards
> Ogbos
>
> On Tue, Jun 18, 2024 a
C_NAME=C
> [9] LC_ADDRESS=C LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> loaded via a namespace (and not attached):
> [1] compiler_3.4.4
; [1] 55
>
> On Wed, Jun 19, 2024 at 7:52 AM Eric Berger wrote:
>
>> In your R session do
>>
>> library(magrittr)
>> 1:10 %>% sum()
>>
>> This should output 55.
>> If that does not work send the results, include the output of
>> sessionIn
How about
assign(paste0("bop",im), boprobit( etc ))
On Mon, Jun 24, 2024 at 2:41 PM Steven Yen wrote:
> I would like a loop to
>
> (1) read data files 2010midata1,2010midata2,2010midata3; and
>
> (2) name OUTPUT bop1,bop2,bop3.
>
> I succeeded in line 3 of the code below,
>
> BUT not line 4.
assign(paste0("bop",im),boprobit(eqs,mydata,wt=weight,method="BHHH",tol=0,reltol=0,gradtol=1e-5,Fisher=TRUE))
On Mon, Jun 24, 2024 at 2:56 PM Steven Yen wrote:
> Thanks Eric. I am not following your suggested line. Would you just edit
> my line 4? Thanks.
> On 6
as.Date("2022-01-02", origin="1900-01-01", format="%Y-%d-%m")
On Sun, Jul 28, 2024 at 7:24 AM akshay kulkarni
wrote:
> Dear members,
> WHy is the following code returning NA
> instead of the date?
>
>
> > as.Date("2022-01-02", origin = "1900-01-01", format = "%y%d%m
Did you try converting the date column to class Date? Does that work?
On Sun, Jul 28, 2024 at 7:40 AM akshay kulkarni
wrote:
> dear members,
> I have a data frame which contains, among
> others, a date object of monthly frequency which is not regular, i.e some
> mont
The function is lm(), not 1m().
lm stands for "linear model" (the first letter of each word)
On Tue, Aug 6, 2024 at 11:22 AM Rosana Curzel wrote:
> Dear all,
>
> I am introducing in R and I had a problem in the beginning. Please, you can
> see an error message below: (Maybe I am in error. If so
as.POSIXct(as.character(now),tz="UTC")
or
as.POSIXct(as.character(Sys.time()),tz="UTC")
On Thu, Aug 22, 2024 at 12:00 PM Iago Giné Vázquez wrote:
> Hi,
>
> How should POSIXct time zone be changed without modifying the specified
> time (so fix the time zone). I tried
>
> > now <- Sys.time()
>
Hi,
To rephrase what you are trying to do, you want a copy of all the cp
columns, in which all the NAs become 1s and any other value becomes a
zero. There is an exception for the first row, where the NAs should
become 0s.
a <- c10Dt
b <- matrix(as.numeric(is.na(a[,-1])), nrow=nrow(a))
b[1,] <- 0
Martin writes: "there's really no reason for going beyond base R"
I disagree. Lubridate is a fantastic package. I use it all the time. It
makes working with dates really easy, as evidenced by John Kane's
suggestion. I strongly recommend learning to work with it.
The bottom line: as is often the
point is:
> If you know the structure of the data you want to
> parse, then it is best to tell R (or any other language)
> this structure explicitly. "
>
> Fortune nomination!
>
> -- Bert
>
>
>
>
>
>
> Thu, Dec 19, 2019, 2:49 AM Enrico Schumann wrote:
Lovely solution Rolf :-)
On Tue, Dec 24, 2019 at 8:42 AM Rolf Turner wrote:
>
> On 24/12/19 2:29 pm, Jim Lemon wrote:
>
> > Hi Rolf,
> > Following the docs back to draw.key, It looks like the ellipsis
> > argument is ignored. I was hoping for a brilliant solution along the
> > lines of:
> >
> >
Hi,
I have a list L of about 2,600 xts's.
Each xts has a single numeric column. About 90% of the xts's have
approximately 500 rows, and the rest have fewer than 500 rows.
I create a single xts using the command
myXts <- Reduce( merge.xts, L )
By default, merge.xts() does an outer join (which is w
; perfroms one
> multiway merge rather than k-1 two way merges.
>
> do.call("merge", L)
>
> On Thu, Jan 2, 2020 at 6:13 AM Eric Berger wrote:
> >
> > Hi,
> > I have a list L of about 2,600 xts's.
> > Each xts has a single numeric column. About
= "left" only applies with merge.xts if there are two objects.
> If there are more it acts the same as join = TRUE..
> See the Details section of ?merge.xts
>
> On Thu, Jan 2, 2020 at 1:29 PM Duncan Murdoch
> wrote:
> >
> > On 02/01/2020 9:31 a.m., Eric Berger
<- xts(x=rnorm(5),order.by=dtV)
a1Xts <- aXts[1:3,]
a2Xts <- aXts[2:4,]
etc
Happy to hear your views on why other conventions might be better.
Regards,
Eric
On Fri, Jan 3, 2020 at 3:45 PM Joshua Ulrich wrote:
>
> On Fri, Jan 3, 2020 at 1:14 AM Eric Berger wrote:
> >
&g
Hi Thomas,
Jeff is correct that this can be handled via merge, e.g.
df3 <- merge( df2, df1, by="Serial", all=FALSE )
This operation is called an "inner join", and you could use other tools,
such as the dplyr package to accomplish the same thing
df3 <- dplyr::inner_join( df2, df1, by="Serial" )
H
is
Sent from Yahoo Mail on Android
<https://go.onelink.me/107872968?pid=InProduct&c=Global_Internal_YGrowth_AndroidEmailSig__AndroidUsers&af_wl=ym&af_sub1=Internal&af_sub2=Global_YGrowth&af_sub3=EmailSignature>
On Thu, 16 Jan 2020 at 4:24 PM, Eric Berger
wrote:
> u <- l
I have had success using the fromJSON() function in the rjson package.
On Thu, Jan 16, 2020 at 4:22 PM Ioanna Ioannou wrote:
> hello everyone,
>
> and happy new year!
>
> I have this problem: I want to save the name of the 'countries', the
> 'taxonomy_gem' and the 'minimum_im' and 'maximum_im' .
> u <- list(a=1:5, b=letters[1:3])
> u
# $a
# [1] 1 2 3 4 5
#
# $b
# [1] "a" "b" "c"
> u[["a"]]
[1] 1 2 3 4 5
On Thu, Jan 16, 2020 at 1:04 PM Faheem Jan via R-help
wrote:
> Hi. How to extract a column from the list.. I will be thanks full..
>
> Sent from Yahoo Mail on Android
> [[alt
I think a better place to post this question would be
r-package-devel
On Wed, Jan 29, 2020 at 1:07 PM Ashim Kapoor wrote:
> Dear All,
>
> This is a cross post of the following query:-
>
>
> https://stackoverflow.com/questions/59946803/import-directive-in-r-which-file-and-where-in-that-file-sh
Alternatively you might try posting to
r-sig-fina...@r-project.org
On Wed, Mar 4, 2020 at 9:38 PM Bert Gunter wrote:
> Your question is way off topic here -- this list is for R programming
> questions, not statistical consulting. You might wish to try
> stats.stackexchange.com for the latter.
I have no experience with these packages/libraries. I did a Google search
on 'R interface for G@RCH' and there seemed to be a number of relevant
hits, such as
https://faculty.chicagobooth.edu/ruey.tsay/teaching/bs41202/sp2009/G@RCH_info.txt
HTH,
Eric
On Sun, Mar 8, 2020 at 12:42 PM Jim Lemon
It is possible to work out this problem explicitly. Playing with a few
different calls to optim shows that the method="L-BFGS-B" gives the correct
answer.
I don't have particular insight into why method="CG" is problematic.
On Thu, Mar 12, 2020 at 4:12 PM Jeff Newmiller
wrote:
> The help file p
CRAN Rmpfr
On Sat, Mar 14, 2020 at 7:36 PM 林伟璐 <13917987...@163.com> wrote:
> Dear all
>
>
> I need a multiprecision computing package in R, if anyone in the list
> knows, please let me known...
>
>
> Many thanks
>
>
> Weilu Lin
> [[alternative HTML version deleted]]
>
>
Another comment: if you are running your program in RStudio, it will create
the sequence
of plots but you need to "page back" to see them. Click the "Plots" tab and
notice there are
two arrows: back (pointing to the left) and forward (pointing to the right)
HTH,
Eric
On Mon, Mar 30, 2020 at 5:04
401 - 500 of 554 matches
Mail list logo