similar to: Function built with segments

Displaying 20 results from an estimated 20000 matches similar to: "Function built with segments"

2010 Dec 01
3
RFC: sapply() limitation from vector to matrix, but not further
sapply() stems from S / S+ times and hence has a long tradition. In spite of that I think that it should be enhanced... As the subject mentions, sapply() produces a matrix in cases where the list components of the lapply(.) results are of the same length (and ...). However, it unfortunately "stops there". E.g., if you *nest* two sapply() calls where the inner one produces a matrix, very
2013 Apr 25
1
Linear Interpolation : Missing rates
Dear R forum I have data.frame as df = data.frame(rate_name = c("USD_1w", "USD_1w", "USD_1w", "USD_1w", "USD_1m", "USD_1m", "USD_1m", "USD_1m", "USD_2m", "USD_2m", "USD_2m", "USD_2m",  "GBP_1w", "GBP_1w", "GBP_1w", "GBP_1w",
2011 Oct 19
1
Square ended segments
Good Afternoon R Community, I am working on plotting behavior codes over short durations of time (a few seconds at a time over 1-2 hrs). I am utilizing as.POSIXct to store the time. I wanted to make a quasi time line using these time. I utilized the segments function to represent these times. However the segments rounds off at the ends and does not have the crisp look I need for my purposes.
2024 Jan 11
4
arrow on contour line
Hello, I am drawing contour lines for a function of 2 variables at one level of the value of the function and want to include a small arrow in any direction of increase of the function. Is there some way to do that? Below is an example that creates the contour lines. How do I add one small arrow on each line in the direction of increase of the function (at some central point of the contour
2007 Jul 18
1
nested for loop
Hi, I am new to programming and R. I am reading the manual and R books by Dalgaard and Veranzo to help answer my questions but I am unable to figure out the following: I have a data file that contains 1080 data points. Here's a snippet of the file: [241] 0.3603704000 0.1640741000 0.2912963000 NA 0.0159259300 0.0474074100 I would like to break the file up into 30
2005 Dec 14
2
The fastest way to select and execute a few selected functions inside a function
Dear useRs? I have the following problem! I have a function that calls one or more functions, depending on the input parameters. I am searching for the fastest way to select and execute the selected functions and return their results in a list. The number of possible functions is 10, however usually only 2 are selected (although sometimes more, even all). For examples, if I have function
2018 May 03
2
Calling the curve function with a character object converted into an expression
Hi, Down a cascade of function calls, I want to use the curve function with an expression that is a variable. For various reason, this variable must be a character object and cannot be an expression as required by the curve function. How do I convert my variable into a expression that is accepted by curve? Thanks in advance for your help. ## The following attempts do not work myf <-
2005 Nov 23
3
Infinite recursion in S3 methods crashes R on windows (related to PR#8203?)
Hi, Infinite recursion in S3 methods seem to crash R on Windows 2000 (R terminating with the ("Rgui.exe has generated errors...") message, rather than throwing an error. This happens with both Rgui and Rterm. The following toy example triggers this: myf <- function(x, ...) UseMethod("myf") myf.default <- function(x, ...) myf(x) myf(1) ...R crashes... Which I
2008 Jun 19
1
error related to approxfun in R 2.7.0
I'm testing R version 2.7.0 on windows and there seems to be a compatibility issue with objects that were created by "approxfun" in older versions. As long as the objects were created in version 2.7.0 things work ok, but calling the interpolated functions from R version 2.0.1 causes this error: Error in .C("R_approx", as.double(x), as.double(y), as.integer(n), xout =
2011 Feb 22
1
Discrepancies in run times
Dear R-users, I am in the process of creating new custom functions and am quite puzzled by some discrepancies in execution time when I run some R scripts that call those new functions. So here is the situation: - let's assume I have created two custom functions, called myg and myf; - myg is mostly a plotting function, which makes a heavy use of grid and lattice functions; - myf is a function
2015 Sep 02
1
DC sync
Morning, On a DC: [root at BPCTASRVSDC003 ~]# samba-tool drs showrepl | grep failure 0 consecutive failure(s). 0 consecutive failure(s). 0 consecutive failure(s). 0 consecutive failure(s). 0 consecutive failure(s). 0 consecutive failure(s). 0 consecutive failure(s). 0 consecutive failure(s). 0 consecutive failure(s). 0 consecutive failure(s). 0 consecutive failure(s). 0
2018 May 03
0
Calling the curve function with a character object converted into an expression
Sebastian: This is somewhat arcane, perhaps even a bug (correction on this welcomed). The problem is that the "expr" argument to curve() must be an actual expression, not a call to parse that evaluates to an expression. If you look at the code of curve() you'll see why (substitute() does not evaluate expr in the code). Another simple workaround other than sticking in the eval()
2012 Nov 06
1
how Can make function for selecting the products
HI. I make this code: getdata<-function('a','b','c' ,'d','e','f'){ drv <- dbDriver("SQLite") con<-dbConnect(drv, "sqlite.db") lt<-dbListTables(con) myf<-data.frame(NULL) for (i in 1:length(lt)) { myfile<-dbReadTable(con,lt[i]) myfile1<-myfile[-c(14:44)] myfile1$MODEL<-gsub(" ",
2018 May 03
1
Calling the curve function with a character object converted into an expression
Typo: should be NULL not NUL of course An alternative approach closer to your original attempt is to use do.call() to explicitly evaluate the expr argument: w <- "1 + x^2" do.call(curve, list(expr = parse(text = w), ylab ="y")) Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus
2015 Feb 10
1
DNS synchronisation problems
Hi, I have replications problems on one of my server. Replication was working since month and yet stopped working. on the remote server: islad01:~ # samba-tool drs showrepl | more Default-First-Site-Name\ISLAD01 DSA Options: 0x00000001 DSA object GUID: 3fe6bc7c-1116-4344-96a6-c58c43bc217f DSA invocationId: 89351eec-7207-45f5-b6b9-cebfcacfd0e3 ==== INBOUND NEIGHBORS ====
2017 Mar 14
2
AD replication issue
Changes replicate to it, but not from it. vsc\VSC-DC02 DSA Options: 0x00000001 DSA object GUID: fe066b13-6f9e-4f3c-beb4-37df1292b8cb DSA invocationId: 8a2b1405-07b1-4d92-89dd-1d993e59e378 ==== INBOUND NEIGHBORS ==== DC=DomainDnsZones,DC=mediture,DC=dom vsc\DC01 via RPC DSA object GUID: da9bb168-47a0-4368-aff3-bf06d1b869d2 Last attempt @ Tue Mar 14
2010 Feb 03
1
Additional field data collection
This is a subset of a much larger dataframe. I would like to be able to automate finding the pair of x, y coordinates where the line crosses zero agian x <- (structure(list(bankfull_depths_m = c(0, 0.17, 0.38, 0.37, 0.36, 0.39, 0.47, 0.48, 0.19, 0.05, -0.05, -0.09), measurment_num_m = c(0.2, 0.4, 0.6, 0.8, 1, 1.2, 1.4, 1.6, 1.8, 2, 2.2, 2.4)), .Names = c("bankfull_depths_m",
2010 Dec 18
3
use of 'apply' for 'hist'
Hi all, ########################################## dof=c(1,2,4,8,16,32) Q5=matrix(rt(100,dof),100,6,T,dimnames=list(NULL,dof)) par(mfrow=c(2,6)) apply(Q5,2,hist) myf=function(x){ qqnorm(x);qqline(x) } apply(Q5,2,myf) ########################################## These looks ok. However, I would like to achieve more. Apart from using a loop, is there are fast way to 'add' the titles to be
2014 May 08
1
Trouble demoting DC with broken replication
Hi all, I am currently struggling to remove one of our Samba4 DC from the domain. Some time ago, adding a new Samba DC to our AD did not succeed and I had to demote the new server again. After removal, replication on one of the old/existing DCs got weird. /usr/local/samba/bin/samba-tool drs showrepl gives the following: Standardname-des-ersten-Standorts\dc02 DSA Options: 0x00000001 DSA object
2011 Feb 03
1
Getting variable names in function output
Dear R-users, I would like to have some advises about a problem illustrated by the following snippet. Within myf, I need to evaluate a piece of R code that is passed as a character argument and then return the objects that are created by this code. The difficulty comes from the fact that the content of the code is variable and unknown to me (obviously not in this illustration!). With the