Displaying 20 results from an estimated 800 matches similar to: "How to use Sys.time() while writing a csv file name"
2011 Mar 25
1
Appending data to a data.frame and writing a csv
Dear R helpers
exposure <- data.frame(id = c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20),
ead = c(9483.686,50000,6843.4968,10509.37125,21297.8905,50000,706152.8354, 62670.5625, 687.801995,50641.4875,59227.125,43818.5778,52887.72534,601788.7937, 56813.14859,4012356.056,1419501.179,210853.4743,749961,6599.0862),
pd =
2011 Jan 20
0
Bandwidth - Kernel Density Estimation
Dear R helpers
I am having recovery rates as given below and I am trying to estimate the Loss Given Default (LGD) and for this I am using Kernel Density estimation method.
recovery_rates = c(0.61,0.12,0.10,0.68,0.87,0.19,0.84,0.81,0.87,0.54,0.08,0.65,0.91,
0.56,0.52,0.30,0.41,0.24,0.66,0.35,0.36,0.64,0.55,0.43,0.36,0.28,0.89,0.11,0.23,0.07,
2011 Aug 15
2
A small nag
Hi,
I am not sure how to fix the following error.
LGD <- c(11.6, 12.3, 15.8, 33.1, 43.5, 51.3,
67.3, 84.9)
cor (x=(file [1:47231,3:10]), y= rep (LGD, 47231), method = "pearson")
Error in cor(x = (file[1:47231, 3:10]), y = rep(LGD, 47231), method =
"pearson") :
incompatible dimensions
> sessionInfo()
R version 2.13.0 (2011-04-13)
2012 Jul 18
4
The best solver for non-smooth functions?
# Hi all,
# consider the following code (please, run it:
# it's fully working and requires just few minutes
# to finish):
require(CreditMetrics)
require(clusterGeneration)
install.packages("Rdonlp2", repos= c("http://R-Forge.R-project.org",
getOption("repos")))
install.packages("Rsolnp2", repos= c("http://R-Forge.R-project.org",
2005 Apr 12
2
not plotting when non-existent
R-help,
I'm trying to plot the following:
year lgd
1 1986 136.97479
2 1987 69.10377
3 1988 67.66744
4 1989 71.60316
5 1990 62.06897
6 1992 6.25000
7 1993 27.72021
8 1995 23.83648
9 1996 10.29412
10 1997 95.67487
11 1998 82.09367
12 1999 56.60401
13 2000 29.80864
14 2001 23.77535
15 2002 48.30378
16 2003 83.47571
17 2004 74.58711
There are 2 missing years
2010 Jan 21
1
Cannot join domain
Hello, I just configured a computer on my local network to work as a PDC
with Samba, although I'm not able to join the Domain from the windows
computer I want to add. I though it was that the server was unreachable, but
I can ping the server from the computer and viceversa. If someone please can
help me, I'll appreciate it.
The smb.conf file is here:
-------------------
[global]
2007 Dec 16
1
./configure perfparse -> "configure: error: required library libgd unusable"
I recently had a problem with the configure script from perfparse running
properly so that I could 'make install' it to work with Nagios 2.10 on
latest CentOS 4.x + RPMForge (see
http://readlist.com/lists/centos.org/centos/5/28966.html). Thinking it was a
problem that was a result of "yum remove gd", I formatted the box and
reinstalled everything.
Now, oddly, I still have the
2011 Apr 06
1
executing from .R source file in the src package
Can I run R code straight from R src (.R) file instead of .rdb/.rdx? I of
course tried simply unzipping tar.gz in the R_LIBS directory but R complains
with "not a valid installed package".
Real issue: I am very new to R and all, so this could be something basic.
I'm trying to use ess-tracebug (Emacs front-end to trace/browser et al).
It works great when I trace functions in .R
2010 Sep 01
2
Makefile bug in nut-2.4.3
I'm just in the process of upgrading from nut-2.4.1 to 2.4.3 on a
dual-Xeon box running Solaris 10 amd64 (i686-pc-solaris2.10). I
configured as follows:
./configure --prefix=/opt/nut --with-gnu-ld --with-serial --without-usb
--with-cgi --with-gd-includes=-I/usr/local/include
--with-gd-libs="-L/usr/local/lib -R/usr/local/lib -lgd" --with-user=nut
--with-group=nut
2014 Jan 06
2
Reversing the Equation to find value of variable
Dear R forum
I have following variables -
EAD = 10000
LGD = 0.45
PD = 0.47
M = 3
# Equation 1
R = 0.12*(1-exp(-50*PD))/(1-exp(-50)) + 0.24*(1-(1-exp(-50*PD))/(1-exp(-50)))
b = (0.11852 - 0.05478 * log(PD))^2
K = (LGD * pnorm((1 - R)^(-0.5) * qnorm(PD) + (R / (1 - R))^0.5 * qnorm(0.999)) - PD * LGD) * (1 - 1.5 * b)^(-1) * (1 + (M - 2.5) * b)
RWA = K * 12.5 * EAD
> RWA
[1] 22845.07
#
2014 Oct 20
2
config file locations
On Sunday 19 October 2014 22:03:23 Charles Lepple did opine
And Gene did reply:
> Hi Gene,
>
> On Oct 18, 2014, at 7:35 PM, Gene Heskett <gheskett at wdtv.com> wrote:
> > Greetings;
> >
> > I found pdf user manual which explains a few things that might help.
> >
> > However, for a ubuntu flavor, the various .conf etc files seem to be
> > in
2006 May 19
1
make error for R-2.3.0
Hello,
I'm trying to install R on a linux machine running Red Hat 8. I ran
./configure
make
and get the following error. I've installed several versions of R (2.2.1
most recently) on this machine and haven't had any problems until now. I
wondered if the outdated compiler (gcc version 3.2) was the problem and
attempted to install my own, more recent version. I tried gcc versions 4.1.0
2011 Aug 23
4
Correlation discrepancy
Dear R list, I have one very elementary question regrading correlation between two variables.
x = c(44,46,46,47,45,43,45,44)
y = c(44,43,41,41,46,48,44,43)
> cov(x, y)
[1] -2.428571
However, if I try to calculate the covariance using the formula as
covariance = sum((x-mean(x))*(y-mean(y)))/8 # no of of paired obs. = 8
or
covariance = sum(x*y)/8-(mean(x)*mean(y))
gives
2011 Mar 29
3
Reversing order of vector
Dear R helpers
Suppose I have a vector as
vect1 = as.character(c("ABC", "XYZ", "LMN", "DEF"))
> vect1
[1] "ABC" "XYZ" "LMN" "DEF"
I want to reverse the order of this vector as
vect2 = c("DEF", "LMN", "XYZ", "ABC")
Kindly guide
Regards
Vincy
[[alternative HTML
2023 Jan 31
0
New package - LGDtoolkit
Dear all,
my new R package LGDtoolkit is now on CRAN.
The goal of this package is to cover the most common steps in Loss Given
Default (LGD) rating model development. The main procedures available are
those that refer to bivariate and multivariate analysis.
In particular two statistical methods for multivariate analysis are
currently implemented ? OLS regression and fractional logistic
2023 Jan 31
0
New package - LGDtoolkit
Dear all,
my new R package LGDtoolkit is now on CRAN.
The goal of this package is to cover the most common steps in Loss Given
Default (LGD) rating model development. The main procedures available are
those that refer to bivariate and multivariate analysis.
In particular two statistical methods for multivariate analysis are
currently implemented ? OLS regression and fractional logistic
2010 Oct 27
4
One silly question about "tapply output"
Dear R helpers
I have a data which gives Month-wise and Rating-wise Rates. So the input file is something like
month rating rate
January AAA 9.04
February AAA 9.07
..........................................
..........................................
Decemeber AAA 8.97
January BBB 11.15
February
2011 Mar 09
3
Rearranging the data
Dear R helpers,
xx = data.frame(country = c("USA", "UK", "Canada"), x = c(10, 50, 20), y = c(40, 80, 35), z = c(70, 62, 10))
> xx
country x y z
1 USA 10 40 70
2
UK 50 80 62
3 Canada 20 35 10
I need to arrange this as a new data.frame as follows -
country type values
USA
2014 Oct 22
0
config file locations
On Tuesday 21 October 2014 22:06:48 Charles Lepple did opine
And Gene did reply:
> Hi Gene,
>
> On Oct 21, 2014, at 9:12 PM, Gene Heskett <gheskett at wdtv.com> wrote:
> >> configure: error: libgd not found, required for CGI build
> >>
> >> And gdlib does not appear to be available from the repo's.
>
> Sorry, I must have missed that message.
2011 Jan 25
4
Subtracting elements of data.frame
Dear R helpers
I have a dataframe as
df = data.frame(x = c(1, 14, 3, 21, 11), y = c(102, 500, 40, 101, 189))
> df
x y
1 1 102
2 14 500
3 3 40
4 21 101
5 11 189
# Actually I am having dataframe having multiple columns. I am just giving an example.
I need to subtract all the rows of df by the first row of df i.e. I need to subtract each element of 'x' column by 1. Likewise I