search for: dx

Displaying 20 results from an estimated 1150 matches for "dx".

Did you mean: idx
2011 Mar 24
5
subset and as.POSIXct / as.POSIXlt oddness
Dear R users, Given this data: x <- seq(1,100,1) dx <- as.POSIXct(x*900, origin="2007-06-01 00:00:00") dfx <- data.frame(dx) Now to play around for example: subset(dfx, dx > as.POSIXct("2007-06-01 16:00:00")) Ok. Now for some reason I want to extract the datapoints between hours 10:00:00 and 14:00:00, so I thought wel...
2009 Nov 18
4
Switch Help
Dear Rexperts, Given, aar <-function(command) { switch(command, {scrn = cat("scrn :Screening","\n")} {dx = cat("dx :Diagnosis","\n")} {df = cat("df :Don't Forget","\n")} ) } I want to be able to do: aar("dx") # function does cat("dx :Diagnosis","\n") aar(c("dx","df")) # function does cat(&q...
2009 Mar 31
1
[PATCH 1/1] CORE/cache: add cache priority parameter
From: Gene Cumm <gene.cumm at gmail.com> CORE/cache: add cache priority parameter; Passing in DX=0 forces the cache entry to stay at the least recently used spot. Any other value allows it to continue on previous behavior of most recently used position in the list. Change ldlinux.asm and extlinux.asm (the only 2 users of cache) to pass in DX=1. Push/Pop DX unless it's definitely safe to...
2011 Aug 26
1
matrix bands
...naive version, and a more efficient version. The band index, n, is positive for bands above the diagonal and negative for bands below the diagonal. Regards, Jeremy Silver ############################################### ## less clear formulation - more efficient band <- function(x,n = 0){ dx <- dim(x) if(length(dx) != 2L) stop("only matrix bands can be accessed") max.dx <- max(dx) n <- as.integer(n) ij <- cbind(i = seq(1,max.dx) - n, j = seq(1,max.dx)) ij <- ij[1 <= ij[,1] & ij[,1] <= dx[1] & 1 <= ij[,2] &am...
2002 Nov 04
0
uncertainty principle is untenable !!!
...the electron. The electron is then illuminated from the left by gamma rays--high energy light which has the shortest wavelength. These yield the highest resolution, for according to a principle of wave optics, the microscope can resolve (that is, "see" or distinguish) objects to a size of dx, which is related to and to the wavelength L of the gamma ray, by the expression: dx = L/(2sinA) (1) However, in quantum mechanics, where a light wave can act like a particle, a gamma ray striking an electron gives it a kick. At the moment the light is diffracte...
2002 Oct 16
0
uncertainty principle is untenable !!! (new)
...the electron. The electron is then illuminated from the left by gamma rays--high energy light which has the shortest wavelength. These yield the highest resolution, for according to a principle of wave optics, the microscope can resolve (that is, "see" or distinguish) objects to a size of dx, which is related to and to the wavelength L of the gamma ray, by the expression: dx = L/(2sinA) (1) However, in quantum mechanics, where a light wave can act like a particle, a gamma ray striking an electron gives it a kick. At the moment the light is diffracte...
2010 Sep 07
0
AHRQ - Creation of Comorbidity Variables
...ULCER', # 'AIDS','LYMPH','METS','TUMOR','ARTH', # 'ANEMDEF','ALCOHOL','DRUG','PSYCH','DEPRESS') ) flag = function(data, k) { data = data[k, ] print(data) print(k) id = as.matrix(data[1]) DX = data[4:53] DX = as.matrix(DX) DRG = as.matrix(data[2]) ##########format############################################################ chf = c(39891, 4280:4289, 42800:42889) v1 = paste(0, 9320:9324, sep = "") v5 = paste("V422", "", sep = "&q...
2007 Apr 30
0
[LLVMdev] Boostrap Failure -- Expected Differences?
...fs > 3cf: 61 popa > 3d0: 67 2f addr16 das > - 3d2: 70 72 jo 446 <__FUNCTION__.21160+0xd> > + 3d2: 70 72 jo 446 <__FUNCTION__.21073+0xd> > 3d4: 6f outsl %ds:(%esi),(%dx) > 3d5: 6a 65 push $0x65 > 3d7: 63 74 73 2f arpl %si,0x2f(%ebx,%esi,2) > @@ -11642,13 +11642,13 @@ > 3e1: 65 gs > 3e2: 2f das > 3e3: 63 6f 6d arpl %bp,0x6d(%edi) > - 3e6: 70 69...
2008 Apr 11
2
How to fill out some columns?
Dear R users, I'm working with 2 data sets which look like (for example) dx and dy in the next code: # Seed set.seed(4) # First data frame dx=matrix(rnorm(6*5),ncol=6) colnames(dx)=LETTERS[1:6] # Second data frame dy=matrix(rnorm(3*5),ncol=3) colnames(dy)=c('A','C','E') As you will notice, some columns in both data sets have the same names. At...
2009 Aug 25
4
Error when run MS Foxpro on wine
...9.04, i have errors when run MS foxpro : namhv at ubuntu:/media/disk/ktgd$ wine foxprox.exe fixme:gdi:get_default_fonts unhandled charset 0x000000a3 - use ANSI_CHARSET for default stock objects err:int:DOSVM_Int15Handler int15: unknown/not implemented parameters: int15: AX 2403, BX e6f5, CX 0c6c, DX 00fc, SI 0cfe, DI 571e, DS 199b, ES f000 err:int:DOSVM_Int2fHandler int2f: unknown/not implemented parameters: int2f: AX ed00, BX 0c03, CX 4445, DX 5351, SI 0cfe, DI 571e, DS 199b, ES 199b err:int:DOSVM_Int2fHandler int2f: unknown/not implemented parameters: int2f: AX ed00, BX 0c04, CX 4445, DX 535...
2010 Apr 23
2
Problem with parsing a dataset - help earnestly sought
...amples of these columns, 'cancer.problems', and 'neuro.problems' are depicted below. Essentially, I need to parse this into a useful dataset, and unfortunately, I am not familiar with perl or any such language. data <- data.frame(id=c(1:10)) data$cancer.problems <- c("Y; DX AGE: 28; COLON", "", "Y; DX AGE: 27;", "Y; LIVER","","Y","Y; DX AGE: 24;","Y","Y;DX AGE: 44;","Y;DX AGE: 39; TESTIS") data$neuro.problems <- c("Y: DX AGE: 80-89;","Y","",&...
2011 Aug 11
1
Splitting data
...me to acchieve my goal. This is what I tried so far with test data: a = rnorm(9,0,0.1) b = rnorm(7,1,0.1) data = c(a,b) plot(data) # Want to calculate max of groups/split for the data d = seq(1,100,1) n = 2^d m <- which(n <=length(data)) n = n[m[1]:m[length(m)]] # All groups i=0 j=0 dx = 0 dy = for (i in 1:length(n)){ split <- length(data)/(n[i]) for (j in 1:(n[i]/2)){ x = data[(1 + (j-1)*(2*split)):(round(split) + (j-1)*(2*split))] dx = cbind(dx,x) y = data[((round(split)+1) + (j-1)*(2*split)):(2*j*split)] dy = cbind(dy,y) }} dx = dx[,2:dim(dx)[2]] dy = dy[,2:dim(dy)[2]]...
2001 Dec 14
2
colSums in C
...my C code to get results comparable to colSums, or even to method 2? Is it stupid code, a bad compiler, non-optimal optimizer options, or ??? Here's my interface function and simple C code (compiled with gcc via R SHLIB, no Makevars file): g.apply.sum <- function(x, MARGIN=1, na.rm=T) { dx <- dim(x) if (na.rm) x[is.na(x)] <- 0 .C("applysum", as.real(x), dx, as.integer(MARGIN), z=real(dx[MARGIN]), DUP=FALSE)$z } void applysum(double *x, long *dx, long *mar, double *z) { long i, j; if (*mar==1) for(i=0; i<dx[0]; i++) for(j=0; j<dx[1]; j++) z[i] +...
2010 Nov 26
1
[PATCH] new *br: Show handoff data
...s:vararg .endm #endif /* DEBUG_MARKER1 */ #ifdef DEBUG_LOADE .macro LOADE r:req, t:req movw (e_\r), %\t .endm #else /* DEBUG_LOADE */ .macro LOADE r:req, t:req popw %\t .endm #endif /* DEBUG_LOADE */ .code16 .text entry = 0x7c00 stack = (entry) e0_ax = (stack-2) e0_cx = (stack-4) e0_dx = (stack-6) e0_bx = (stack-8) e0_sp = (stack-10) e0_bp = (stack-12) e0_si = (stack-14) e0_di = (stack-16) e0_bot = (stack-16) e_di = (e0_bot-2) /* Original register values from entry point */ e_es = (e0_bot-4) e_si = (e0_bot-6) e_ds = (e0_bot-8) BIOS_page = 0x462 .globl _start _start:...
2008 Jun 25
1
Incompatible methods ("+.Date", "Ops.difftime") for "+"
...ence of my as.numeric() workaround? Can a fix to the code base, perhaps similar to my workaround, make this warning no longer necessary? I am using R 2.7.0 on Windows. version.string R version 2.7.0 (2008-04-22) Thanks Rich xlim <- as.Date(c("2005-04-09", "2007-09-07")) dx <- diff(xlim) xlim + c(-.02, .02)*dx ## correct answer and warning message xlim + as.numeric(c(-.02, .02)*dx) ## correct answer > xlim <- as.Date(c("2005-04-09", "2007-09-07")) > xlim [1] "2005-04-09" "2007-09-07" > dx <- dif...
2010 Apr 26
1
finite difference scheme for 2D differential equations
...i can simulate one dimensional diffusion using a code like the following. But I want to write a similar code for,say, a two dimensional diffusion equation. Any kind of help/advice is highly appreciated. Here is how I did for the 1D equation (in this case for 1D diffusion) Equation: dc/dt = D*d^2c/dx^2 dx = 10 dt = 0.1 D = 15 n = 20 tstep = 200 C = 50 dt = 0.1 dx = 10 conc<-matrix(0,tstep,n) conc[1,1:10] = C for (i in 2:tstep) { for (j in 1:n){ if (j==1){ conc[i,j] = conc[i-1,j] - dt*(D/dx^2)*(conc[i-1,j] - conc[i-1,j+1]) } conc[i,j] = conc[i,j] if(j >1 && j < n){ conc[i,j]...
2012 Oct 10
3
Generating random geographical coordinates
Dear all, I have two coordinates vectors, say X and Y of length n. I want to generate for each couple of coordinates X1,Y1 X2,Y2 X3,Y3....Xn,Yn a random coordinate which is located in a square define as X +/- dx and Y +/- dy. I saw the runif function which can generate for just one value at a time what I want : runif(1, X - dx, X + dx) for X and runif(1, Y - dy, Y + dy) for Y. I would like to know if there is not a more powerfull way in R to generate directly the set of random coordinates. Regards --...
2007 Apr 27
2
[LLVMdev] Boostrap Failure -- Expected Differences?
The saga continues. I've been tracking the interface changes and merging them with the refactoring work I'm doing. I got as far as building stage3 of llvm-gcc but the object files from stage2 and stage3 differ: warning: ./cc1-checksum.o differs warning: ./cc1plus-checksum.o differs (Are the above two ok?) The list below is clearly bad. I think it's every object file in the
2008 Mar 05
0
[PATCH] ioemu: fix SDL mouse events processing
...ate = SDL_GetMouseState(NULL, NULL); while (SDL_PollEvent(ev)) { switch (ev->type) { case SDL_VIDEOEXPOSE: @@ -475,41 +477,38 @@ case SDL_MOUSEMOTION: if (gui_grab || kbd_mouse_is_absolute() || absolute_enabled) { - int dx, dy, state; - state = SDL_GetRelativeMouseState(&dx, &dy); - sdl_send_mouse_event(dx, dy, 0, state); + int dx, dy; + SDL_GetRelativeMouseState(&dx, &dy); + if (dx || dy) + sdl_send_mouse_ev...
2005 Jul 11
0
[LLVMdev] X86AsmPrinter + MASM and NASM backends
...l code generator generates percents, look at the X86InstrInfo.td > file it is full of them. Ah, I see what you're talking about. Please feel free to remove all of those from the Intel format. For example, change this: def IN8rr : I<0xEC, RawFrm, (ops), "in{b} {%dx, %al|%AL, %DX}">, Imp<[DX], [AL]>; to: def IN8rr : I<0xEC, RawFrm, (ops), "in{b} {%dx, %al|AL, DX}">, Imp<[DX], [AL]>; For register allocatable values, changing printOp in the X86IntelAsmPrinter should do the job. > The X86IntelAsmPrint...