similar to: optimize integer function parameters

Displaying 20 results from an estimated 400 matches similar to: "optimize integer function parameters"

2011 Jul 27
1
create a index.date column
Dear R users, I created a matrix that tells me the first day of use of a category by id. #Calculate time difference test$tdiff<-as.numeric(difftime(as.Date("2002-09-01"), test$ftime, units = "days")) # obtain the index date per person and dcategory index.date.test<-tapply(test$tdiff, list(test$id, test$rcat), max) Nonetheless, at the moment I think will be
2012 Sep 17
3
eval(parse(...)) only once in a function
Hi I would like to have something like str <- "df$JT == 12" fun <- function(df) { b <- eval(parse(str)) return(b) } but for performance "eval(parse(a))" should not be evaluated at each function call, but should work as fun <- function(df) { b <- df$JT == 12 return(b) } Do you have an idea how I can implement this? Thx Christof
2012 Aug 14
3
self-starter functions for y = a + b * c^x
Hi there are some predefined self-start functions, like SSmicmen, SSbiexp, SSasymp, SSasympOff, SSasympOrig, SSgompertz, SSflp, SSlogis, SSweibull, Quadratic, Qubic, SSexp (nlrwr) Btw, do you know graphic examples for this functions? The SSexpDecay (exponential decay) for y = (y0 - plateau)*exp(-k*x) + plateau from
2012 Oct 26
2
connect points in charts
Hi is there a automatic way that long distances between points are not connected. I have something like plot(x,y,type="o",...) atx <- seq(as.Date("2009-04-01"),as.Date("2011-04-01"),"month") axis.Date(1, at=atx,labels=format(atx, "%b\n%Y"), padj=0.5 ) but I do not want lines between points whose distance is greater than two weeks. thx
2012 Jul 02
2
save conditions in a list
Hi how would you save conditions like a = "day > 100"; b = "val < 50"; c = "year == 2012" in a list? I like to have variables like "day", "val", "year" and a list of conditions list(a,b,c). Then I want to check if a & b & c is true or if a | b | c is true or similar things. Greetings Christof
2013 Feb 18
1
ACL problem with Samba > 3.4.x on GPFS
When a file is created with samba 3.5.x or 3.6.x, it is created effective read-only: ~ # getfacl Microsoft\ Word-Dokument\ \(neu\).docx # file: Microsoft\040Word-Dokument\040(neu).docx # owner: root # group: 11816 user::rwx user:11582:rwx #effective:r-- group::rwx #effective:r-- mask::r-- other::--- The ACL-settings for the parent directory are ok: ~ # getfacl . #
2012 Apr 14
3
Choose between duplicated rows
Dear r experts, Sorry for this basic question, but I can't seem to find a solution? I have this data frame: df <- data.frame(id = c("id1", "id1", "id1", "id2", "id2", "id2"), A = c(11905, 11907, 11907, 11829, 11829, 11829), v1 = c(NA, 3, NA,1,2,NA), v2 = c(NA,2,NA, 2, NA,NA), v3 = c(NA,1,NA,1,NA,NA), v4 = c("N",
2016 Jun 07
0
[Announce] Samba 4.4.4 Available for Download
====================================================== "Service to others is the rent you pay for your room here on earth." Muhammad Ali ====================================================== Release Announcements --------------------- This is the latest stable release of Samba 4.4. Changes since 4.4.3: -------------------- o Michael Adam <obnox at samba.org>
2016 Jun 07
0
[Announce] Samba 4.4.4 Available for Download
====================================================== "Service to others is the rent you pay for your room here on earth." Muhammad Ali ====================================================== Release Announcements --------------------- This is the latest stable release of Samba 4.4. Changes since 4.4.3: -------------------- o Michael Adam <obnox at samba.org>
2016 Jun 15
0
[Announce] Samba 4.3.10 Available for Download
====================================================== "There's hair in this tuna fish... I like it!" ALF ====================================================== Release Announcements --------------------- This is the latest stable release of Samba 4.3. Changes since 4.3.9: -------------------- o Jeremy Allison <jra at samba.org> * BUG 10618: Do
2016 Jun 15
0
[Announce] Samba 4.3.10 Available for Download
====================================================== "There's hair in this tuna fish... I like it!" ALF ====================================================== Release Announcements --------------------- This is the latest stable release of Samba 4.3. Changes since 4.3.9: -------------------- o Jeremy Allison <jra at samba.org> * BUG 10618: Do
2011 Dec 09
1
apply on function with vector as result
Hi, a have some code like myfunc <- function(x) { ...; return c(a,b) } ys <- sapply(0:100,myfunc) so I get something like c(c(a1,b1),c(a2,b2),...) But now I need the "as" and "bs" in one vector as <- apply(ys, function(c(a,b)) a) bs <- apply(ys, function(c(a,b)) b) Can you help me with the correct syntax, instead of my pseudo code? thx Christof
2012 Jul 21
1
alternative to rbind for data.table
Hi I want to add a row to a "data.table" in each round of a for loop. "rbind" seems to be a inefficient way to implement this. How would you do this? The "slow" solution: library(data.table) Rprof("test.out") dt <- data.table() for (i in (1:10000)) { # algorithm that generates a list with different values, # but same key-names, each round, for
2012 Jan 20
3
break an axis.POSIXct
Hi I like to use "axis.POSIXct" to plot days from 2006 till 2008. But I only have datas for the summer months. Is it possible to get two axis breaks, to have not so long distances without points? thx Christof
2012 Jan 09
2
RODBC vs gdata
Hi one col in my Excel file contains many numbers. But on line 3000 and some other lines are strings like "FG 1". "RODBS" seems to omit this lines. "gdata" works, but is much slower. Is this a bug of RODBC or do I apply it wrong? Example with the same "file.xlsx" library(RODBC); excel <- odbcConnectExcel2007("file.xlsx") tab <-
2012 Sep 25
1
nlme function examples for dose-respone
Hi, I want to fit nonlinear dose-response curves, as "fun(X,a,b,c)", for each of our 5 trail locations. Our data basis is something like location plot year dose response For each location there are 4 plots as repetitions (over 3 years). So the interactions "location*year" and "location*plot" should be random effects. There are some examples in "Mixed-Effects
2011 Nov 26
2
simplify source code
Hi I would like to shorten mod1 <- nls(ColName2 ~ ColName1, data = table, ...) mod2 <- nls(ColName3 ~ ColName1, data = table, ...) mod3 <- nls(ColName4 ~ ColName1, data = table, ...) ... is there something like cols = c(ColName2,ColName3,ColName4,...) for i in ... mod[i-1] <- nls(ColName[i] ~ ColName1, data = table, ...) I am looking forward to help Christof
2012 Oct 02
3
lattice xyplot, get current level
Hi xyplot(y ~ x | subject) plots a separate graph of y against x for each level of subject. But I would like to have an own function for each level. Something like xyplot(y ~ x | subject, panel = function(x,y) { panel.xyplot(x,y) panel.curve(x,y) { # something that dependents on the current subject ... } }) How I get the current
2020 May 06
2
Issues porting intrinsics to LLVM 10
I am maintaining proprietary extensions to the RISCV backend for our custom application. I have defined intrinsics for many of the custom instructions. Against LLVM 7 this was working well. When I try to merge my changes into LLVM 10, I get: /home/dej/work/llvm_git/llvm-project/llvm/build/lib/Target/RISCV/RISCVGenGlobalISel.inc:11582:60: error: ‘idaho_mt_begin’ is not a member of
2000 Jun 11
1
NFS Quotas and Samba 2.0.7
Hello everyone! I am currently running Samba 2.0.7 on a RedHat Linux 6.1 box. My user home directories on this box are NFS mounted from another server. Quotas have been enabled on this server and rpc.rquotad is running. On Linux, I can see the user's quotas via a quota -v <username> :- testing:~# quota -v try Disk quotas for user try (uid 1006): Filesystem blocks quota