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
Dear R-users,
I am estimating the DCC-model by using the following code and successfully
making the individual plots indicating the dynamic correlation between the
two variables stored in the R data frame (namely dcc.fit in my code). My
code is
Dat = Date2[,2:13, drop = FALSE]
library(rmgarch)
li
To get multiple plots on the same physical page try
?layout
ot look through the various option under
?par
I do not know enough about DCC models to answer how you get correlations.
Michael
On 25/11/2019 10:34, Subhamitra Patra wrote:
Dear R-users,
I am estimating the DCC-model by using the fol
Thank you for your suggestion. Actually, the correlation is coming in the
DCC model through my above code which I am able to plot it. Is there any
solution that I can extract data from a particular plot. Actually, I am
able to obtain the correlation matrix, but I need the correlation
coefficient se
I have made a list in which each element is a function. If I print
individual elements of the list, then the function code is shown along
with embedded comments. However, if I print the list or sublist, then the
function code is shown without comments. Why (and how) are the comments
hidden?
>
Dear Colleagues,
I hope you are doing well!
I did sentiment analysis on two datasets. As these datasets do not have
same size, to compare emotions in two datasets, i calculated percentages.
In my work, i calculated total occurrence for each emotion for two datasets
separately. To calculate percent
Hi
Without knowing much about functions you use, instead of plotting you could
save results of rcor(dcc.fit, type="R") to
something <- rcor(dcc.fit, type="R")
and use
str(something) to inspect the structure.
Cheers
Petr
> -Original Message-
> From: R-help On Behalf Of Subhamitra
> Pa
I do not see this behavior.
f <- function(x){
## a comment
2
}
g <- list(a =2, fun =f)
> g
$a
[1] 2
$fun
function(x){
## a comment
2
}
> g[[2]]
function(x){
## a comment
2
}
> g[2]
$fun
function(x){
## a comment
2
}
Cheers,
Bert
Bert Gunter
"The trouble with having a
Dunno.
> R.Version()
$platform
[1] "x86_64-apple-darwin15.6.0"
$arch
[1] "x86_64"
$os
[1] "darwin15.6.0"
$system
[1] "x86_64, darwin15.6.0"
$status
[1] ""
$major
[1] "3"
$minor
[1] "6.1"
$year
[1] "2019"
$month
[1] "07"
$day
[1] "05"
$`svn rev`
[1] "76782"
$language
[1] "R"
$version.st
You could use the `pos` arg to place the newly loaded package(s) on
the search path after the stats package. That would give priority for
any functions in the stats package over the newly loaded package (but
also give priority for any other packages earlier on the search path).
On Sat, Nov 23, 20
On 24/11/2019 6:06 p.m., bic...@math.usask.ca wrote:
I have made a list in which each element is a function. If I print
individual elements of the list, then the function code is shown along
with embedded comments. However, if I print the list or sublist, then the
function code is shown withou
Hi Mik,
Echoing Bert and Duncan's suggestions, please see also ?srcref and
?getSrcref
and consider upgrading to a currently supported version of R.
I'd also call out the "keep.source" installation option as important if
your functions
are inside a package - there is some discussion around this at
Different version of R perhaps? Or is there something in my environment
or "preferences" that is different?
Here's what I get with your example.
> f <- function(x){
+ ## a comment
+ 2
+ }
> g <- list(a =2, fun =f)
> g
$a
[1] 2
$fun
function (x)
{
2
}
> g[[2]]
function(x){
##
On 25/11/2019 2:27 p.m., Neal Fultz wrote:
Hi Mik,
Echoing Bert and Duncan's suggestions, please see also ?srcref and
?getSrcref
and consider upgrading to a currently supported version of R.
I'd also call out the "keep.source" installation option as important if
your functions
are inside a pack
Great it works. Thank you so much Eric.
Cheers,
Mayooran
-Original Message-
From: Eric Berger
Sent: Monday, 25 November 2019 11:22 PM
To: Thevaraja, Mayooran
Cc: r-help
Subject: Re: [R] ggplot inside of the function
Hi Mayooran,
If you define the following function
f <- function(m,
Goold idea. This seems to work.
library(dplyr, pos = grep("package:stats", search()) + 1)
On Mon, Nov 25, 2019 at 1:27 PM Greg Snow <538...@gmail.com> wrote:
>
> You could use the `pos` arg to place the newly loaded package(s) on
> the search path after the stats package. That would give prio
16 matches
Mail list logo