Displaying 20 results from an estimated 347 matches for "xd".
Did you mean:
dx
2012 Feb 09
1
Constraint on one of parameters.
...f parameters and want to set a
constraint on only one parameter. Here is my function. What I want to do is
estimate the parameters of a bivariate normal distribution where the
correlation has to be between -1 and 1. Would you please advise how to
revise it?
ex=function(s,prob,theta1,theta,xa,xb,xc,xd,t,delta) {
expo1= exp(s[3]*xa+s[4]*xb+s[5]*xc+s[6]*xd)
expo2= exp(s[9]*xa+s[10]*xb+s[11]*xc+s[12]*xd)
expo3= exp(s[15]*xa+s[16]*xb+s[17]*xc+s[18]*xd)
expo4= exp(s[21]*xa+s[22]*xb+s[23]*xc+s[24]*xd)
expo5= exp(s[27]*xa+s[28]*xb+s[29]*xc+s[30]*xd)
nume1=prob[1]*(s[2]^-s[1]*s[1]*t^(s[1]-1)*expo1)^de...
2008 Jun 11
2
problem with as.Date
Data into R from Excel csv file
xd<-read.csv("court.dates1.txt",as.is=T, header = F)
> str(xd)
'data.frame': 5 obs. of 1 variable:
$ V1: chr "6/6" "5/27" "5/16" "5/2" ...
>xd
V1
1 6/6
2 5/27
3 5/16
4 5/2
5 4/29
cdates <- as.Date(xd, format = " %...
2004 Jul 30
1
plot(x,y) core dump
...In
order to let R compile successfully under gcc 2.9, I have to change one
C statement of file(RHOME//src/modules/X11/devX11.c) line 1768 from
"retrun FALSE" to "retrun NULL", following is C code snapshot:
newX11Desc * Rf_allocNewX11DeviceDesc(double ps)
{
newX11Desc *xd;
/* allocate new device description */
if (!(xd = (newX11Desc*)calloc(1, sizeof(newX11Desc))))
return NULL;
/* From here on, if we need to bail out with "error", */
/* then we must also free(xd). */
/* Font will load at first use. */
if (p...
2001 Feb 13
1
X11 device doesn't handle destroy events correcly (PR#848)
...*************
*** 145,151 ****
static Atom _XA_WM_PROTOCOLS, protocol;
static Rboolean displayOpen = FALSE;
- static Rboolean inclose = FALSE;
static int numX11Devices = 0;
/********************************************************/
--- 146,151 ----
***************
*** 619,632 ****
xd->windowHeight = event.xconfigure.height;
xd->resize = 1;
}
else if ((event.type == ClientMessage) &&
! (event.xclient.message_type == _XA_WM_PROTOCOLS))
! if (!inclose && event.xclient.data.l[0] == protocol) {
! XFindContext(display, event.xclient.wi...
2006 Aug 02
1
RE
...;n' is the number of observations. Now
the Xa matrix will have 9 columns if I give na=3 and p=3, and 6 columns if I
give na =2 and p=3. I understand this part. In order to create Xa with a
dimension of n*9 or n*6 we have to create Xa as cbind(Xa,-Xa) and now when I
get the design matrix say XD then I have 5 or 4 variables, which will be same
as the beta matrix that I intend to get, I get this, but my question is when
I get the XD matrix as explained below the covariate matrix (X) which
initially had 3 columns now changed to a 9 rows and one column and two
additional variables X4 a...
2000 Sep 22
3
eval functions... (PR#668)
...me S-PLUS code to R (a tcl/tk application that uses
R)...
here is the error I got in R (but not in S-PLUS)...so I am wondering if it is a
bug.
Eg., the foll. extract from a function runs fine in S-PLUS but gives the error:
Error in x[[j]] : subscript out of bounds
in R
code snippet .....
attach(xd)
resp <- "iv802"
pickedlist <- "BD + CEC + CLAY + ERODFAC + INCEPTSL"
lmexp <- paste(resp, " ~ ", pickedlist,sep="")
tmpzx <- eval(lm(lmexp,data=xd))
Essentially, I want to do:
lm(iv802 ~ BD + CEC + CLAY + ERODFAC + INCEPTSL, data=xd...
2010 Apr 29
1
Request - adding recycled "lwd" parameter to polygon
...OddEven = FALSE)
{
..debug.hatch <- FALSE
xy <- xy.coords(x, y)
if (is.numeric(density) && all(is.na(density) | density <
0))
density <- NULL
if (!is.null(angle) && !is.null(density)) {
polygon.onehatch <- function(x, y, x0, y0, xd, yd, ..debug.hatch =
FALSE,
...) {
if (..debug.hatch) {
points(x0, y0)
arrows(x0, y0, x0 + xd, y0 + yd)
}
halfplane <- as.integer(xd * (y - y0) - yd * (x -
x0) <= 0)
cross <- halfpla...
2010 Apr 29
1
Request - adding recycled "lwd" parameter to polygon
...OddEven = FALSE)
{
..debug.hatch <- FALSE
xy <- xy.coords(x, y)
if (is.numeric(density) && all(is.na(density) | density <
0))
density <- NULL
if (!is.null(angle) && !is.null(density)) {
polygon.onehatch <- function(x, y, x0, y0, xd, yd, ..debug.hatch =
FALSE,
...) {
if (..debug.hatch) {
points(x0, y0)
arrows(x0, y0, x0 + xd, y0 + yd)
}
halfplane <- as.integer(xd * (y - y0) - yd * (x -
x0) <= 0)
cross <- halfpla...
2000 Sep 28
0
No subject
...using the dialog.create() dialog.display() functions, but I
> cannot seem to implement that functionality in R.....what am I doing wrong?
> I enclose below the sample function...Any help will be greatly
> appreciated....
>
> "tcltktst" <-
+ function(x="") {
+ xd <- read.table(x, header=T)
+ library("tcltk")
+
+ tt <- tktoplevel()
+ tktitle(tt) <- "Diagnostics"
+ label.widget <- tklabel(tt, text="Choose!")
+
+ pptlabs <- function() {
+ plot(xd$iv802, xd$PPT)
+ abline(0,1)
+ tt2 <- tktoplevel()
+...
2001 Dec 05
9
Windows testing
R 1.4.0 is now sinking into feature freeze, and we'd like some help
testing it under Windows. Duncan Murdoch and Uwe Ligges have already
volunteered.
I've put a copy of SetupR140.exe at
http://www.stats.ox.ac.uk/pub/bdr/RWin
Also in that directory is a file TESTING suggesting some tests, not all of
which have been run on this build. As the graphics internals have been
changed a lot
2010 Apr 15
3
Replace / with - in date
Hi,every one .I have searched the solutions in the forum for replacing my
date value which is in a data frame ,01/01/2000 to 01-01-2000 using replace
function but got the following warning message
x<-"2000/01/01"
xd<-as.data.frame(x)
xd$x<-replace(xd$x,xd$x=="/","-")
Warning message:
In `[<-.factor`(`*tmp*`, list, value = "-") :
invalid factor level, NAs generated
Is there any other method of doing it? or am i missing something?. please
let me know if you need any mo...
2000 Sep 28
1
tcltk package functionality
...while
loop in S-PLUS using the dialog.create() dialog.display() functions, but I
cannot seem to implement that functionality in R.....what am I doing wrong?
I enclose below the sample function...Any help will be greatly
appreciated....
Prasad
"tcltktst" <-
function(x="") {
xd <- read.table(x, header=T)
library("tcltk")
tt <- tktoplevel()
tktitle(tt) <- "Diagnostics"
label.widget <- tklabel(tt, text="Choose!")
pptlabs <- function() {
plot(xd$iv802, xd$PPT)
abline(0,1)
tt2 <- tktoplevel()
tktitle(tt2) <...
2004 Aug 04
0
RE: Does tcltk matter for the plot
...f_allocNewX11DeviceDesc is called by newX11DeviceDriver and the
latter
> needs to check the value returned. I think Brian Ripley has made a
fix
> for this problem in the development version of R. The first few lines
> of newX11DeviceDriver now look like ...
>
> newX11Desc *xd;
> char *fn;
>
> xd = Rf_allocNewX11DeviceDesc(pointsize);
> if(!xd) return FALSE;
>
> Unfortunately, your next problem may be that you can't start an X11
> device (it looks like you are failing to allocate memory for the
> device).
>
> Paul
>...
2001 Feb 15
3
who frees dd and xd in X11_Open?
Hi, I'm not sure this is a bug in the code, the comment or my
thinking. So first try goes to r-devel... I find the following
comment in X11_Open () (src/unix/X11/devX11.c):
/* if we have to bail out with "error", then must free(dd) and free(xd) */
A couple lines down, there is:
if (!strncmp(dsp, "png::", 5)) {
FILE *fp;
#ifndef HAVE_PNG
error("No png support in this version of R");
#endif
if (!(fp = R_fopen(R_ExpandFileName(dsp+5), "w")))
error("could not open PNG file `%s'", dsp+...
2004 Jul 30
0
plot() core dump
...In
order to let R compile successfully under gcc 2.9, I have to change one
C statement of file(RHOME//src/modules/X11/devX11.c) line 1768 from
"retrun FALSE" to "retrun NULL", following is C code snapshot:
newX11Desc * Rf_allocNewX11DeviceDesc(double ps)
{
newX11Desc *xd;
/* allocate new device description */
if (!(xd = (newX11Desc*)calloc(1, sizeof(newX11Desc))))
return NULL;
/* From here on, if we need to bail out with "error", */
/* then we must also free(xd). */
/* Font will load at first use. */
if (p...
2010 Dec 17
3
Alternative to extended recode sintax?
Dear R-users,
I have a factor variable within my data frame which I derive week after week from a POSIXct variable using the cut(var,"weeks") command I have found in the chron package. The levels() command gives me:
[1] "2009-03-30 00:00:00" "2009-04-06 00:00:00" "2009-04-13 00:00:00" "2009-04-20 00:00:00" "2009-04-27 00:00:00"
2000 Sep 29
0
Is it R or I?
...> is the Identifying variable
"f.eda.lm"<-
function(dataset="", pickall="", pickedlist="", resp="",idvar="")
{
options(width=200, length=10000)
# Create the main data object
cat("Reading in data", "\n")
xd <- read.table(dataset, header=T,as.is=T)
xd <- read.table(dataset,header=T, as.is=T,
row.names=as.character(1:nrow(xd)))
cat("DONE Reading in data", "\n")
attach(xd)
xd <- xd[, -c(charmatch(paste(resp), names(xd)))]
assign(resp, get(resp))
ndf <-...
2008 Mar 16
2
How to loop through all the columns in dataframe
Hi:
Can anyone advice me on how to loop and perform a
calculation through all the columns.
here's my data
xd<-
c(2.2024,2.4216,1.4672,1.4817,1.4957,1.4431,1.5676)
pd<-
c(0.017046,0.018504,0.012157,0.012253,0.012348,0.011997,0.012825)
td<- c(160524,163565,143973,111956,89677,95269,81558)
mydf<-data.frame(xd,pd,td)
trans<-t(mydf)
trans
I have these values that I need to include while
loop...
2008 Apr 28
2
X11 window title setting in X11() Device (PR#11325)
...ar_1.2-7
`----
Thanks for all your work !
Regards,
Julien=20
--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment; filename=devX11_patch.diff
--- devX11.c.orig 2008-04-28 16:22:46.000000000 +0200
+++ devX11.c 2008-04-28 16:22:57.000000000 +0200
@@ -2225,6 +2225,9 @@
else strcpy(xd->symbolfamily,fn);
}
+ strncpy(xd->title, title, 100);
+ xd->title[100] = '\0';
+
/* Start the Device Driver and Hardcopy. */
if (!X11_Open(dd, xd, disp_name, width, height,
@@ -2238,8 +2241,6 @@
xd->fill = 0xffffffff; /* this is needed to ensure t...
2005 Aug 18
1
RE: [PATCH] supporting non-NX/XD capable processors onx86_64 xenlinux
I have always needed the rm_nx_xd patch to boot Xen / Dom0 on the ES7000
x86_64 but the system boots without any issues on plain vanilla Linux
2.6.
> -----Original Message-----
> From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-
> bounces@lists.xensource.com] On Behalf Of Keir Fraser
> Sent: Thursday, Augu...