similar to: Find the closest value in a list or matrix

Displaying 20 results from an estimated 200 matches similar to: "Find the closest value in a list or matrix"

2008 Jul 02
2
Accessing a field in a data fram
raw <- read.csv(file=filename, head=TRUE,sep=",") I've read in a csv file, and I'm looking to access a column whose name is held in a string. For example, I want to access raw$one or raw$two, but this will depending on the string. Let's say that the string is decision<-"one". How would I access raw$one? The following doesn't work:
2008 Jul 22
2
Plotting Multiple lines on one plot
Hi, I'm trying to plot multiple lines on one plot. I have a data frame raw, and i want to plot raw$date on the x-axis and raw$theta, raw$vega, raw$delta, and a few others on the y-axis, with a legend. However, I'm not sure what the scale of those data sets are, and I don't know which one will have the largest scale. How can I plot this? I've tried ggplot (qplot), but it
2008 Aug 11
1
frequency of labels in a barplot
I'm trying to control the number of labels in the x-axis of my plot. My code is the following: graph1<-barplot(total_skew) axis(1,at = graph1,labels=raw_date[1:length(total_skew)], las=2) however, the length of my "total_skew" parameter is a few thousand elements, and all the labels on the x-axis are overlapping and cluttered. How do I specify the frequency or number of labels
2008 Jul 03
1
Exporting a Graph that has lines()
I'm trying to export a graph (any form is good). I'm trying to export one that uses plot() then lines(). however, it seems that the jpeg format and the pdf format only takes the first line plot, and doesn't even consider the additional plots. My code is the following: output_file<-paste(filez,".pdf",sep="") pdf(output_file) plot((x_data) ~ (y_data), main =
2014 May 06
0
js .closest
I have a script: $ -> $(document).on 'change', ('.ops_select'), -> val = $(".ops_select option:selected").val() $.ajax '/projects/update_oncalls/', type: 'GET' dataType: 'script' data: {ops_group_id: val } which triggers a "update_concalls.js.coffee" file to replace a the value in a select-tag.
2005 Jul 09
0
Closest dialplan language equivalent for dialparties.agi ?
Hi, I'm using AMP and its dialparties.agi as most important script in system. I'd like to port configuration to more embedded system, where I don't have Perl available. So I'd like to implement dialparties.agi functionality as closest as possible with dialplan language..... Are there any existing dialplan scripts-examples that are close related to dialparties.agi
2017 Jun 05
0
CentOS 7 install: closest mirror not supported?
On 06/04/2017 10:29 AM, Jos Vos wrote: > Hi, > > Do CentOS 7 installs not automatically use a closest mirror for > installing like Fedora does, or is that due to the way I'm starting > the install (virt-install)? > > Background: > > I'm trying to find the best way to do installs using basic local media > (network install, but *without* the need to download
2002 Mar 28
0
Summary: Vectorizing closest match
The original problem I posed was Let x = real vector of length n y = real vector of length n w = real vector of length m, m typically less than n/2 but can be > n z = real vector of length m For w[i], i=1,,,m, find the value of x that is closest to w[i]. In the case of ties, select one (optimally at random or just take the first match). Let z[i] = value of y corresponding to the
2010 May 01
2
closest match in R to c-like struct?
Hello, What would be in R the closest match to a c-struct? e.g. data.frame requires all elements to be of the same length ... or is there a way to circumvent this? TIA, Best regards, Giovanni
2013 Apr 11
2
Encircle the closest points
Dear R-user, For the "matplot" of the following data drawn by >matplot(t, pch=1) structure(c(2372L, 2494L, 2170L, 2238L, 1918L, 715L, 1573L, 2437L, 2481L, 1881L, 440L, 2165L, 343L, 121L, 597L, 1163L, 1459L, 2093L, 1454L, 1761L, 1872L, 174L, 2040L, 552L, 1403L, 6381L, 1649L, 4136L, 4415L, 10650L, 12111L, 4397L, 9593L, 7040L, 3888L, 8340L, 11475L, 11413L, 3985L, 1077L, 7723L, 1392L,
2008 Apr 18
3
Closest Fedora to CentOS 4?
Hi, I want to take a SRPM that is available for various versions of Fedora and rebuild it on a CentOS 4 system. Which release of Fedora is the closest to CentOS 4? In other words, which would be the best FC to take the SRPM for? Cheers Tony -- Tony Mountifield Work: tony at softins.co.uk - http://www.softins.co.uk Play: tony at mountifield.org - http://tony.mountifield.org
2010 Jan 17
3
enty-wise closest element
Dear R-users, i have a simple problem maybe, but i don't see the solution. i want to find the entry-wise closest element of an vector compared with another. ind1<-c(1,4,10) ind2<-c(3,5,11) for (i in length(ind2):1) { print(which.min(abs(ind1-ind2[i]))) } for ind2[3] it should be ind1[3] 10, for ind2[2] it should be ind1[2] 4 and for ind2[1] it should be ind1[1] 1. but with the
2007 Jan 06
2
can samba figure out the "closest" domain controller in ADS mode?
I'v got working Samba ADS servers, but "net ads info" shows most of them are associated with Win2K3 domain controllers that are in different sites than the ones the Samba servers are in (we have a large WAN with DCs in every site). I'm not configuring "password server" as I want Samba to be more fault tolerant than pointing it at one DC - when there are many to choose
2012 Nov 20
1
Closest fit data to a particular formula
R folks, I am somewhat new to R and have started to stumble... I have a set of data that I am trying to model, so that I can predict on a much larger set - and I have been using loess to get a model.. but it is not what I would like to see. For instance, I know from the nature of the data that the shape of this line should only decrease, and yet the loess is being affected by the sample
2008 Aug 27
3
Closest value
Hello, I have this command: x.axis <- seq(from=0.5, to=4.5, length.out=13112) How can I which of the x.axis components is the closest to a given value, for example 3.2? Best, Dani -- Daniel Valverde Saub? Grup de Biologia Molecular de Llevats Facultat de Veterin?ria de la Universitat Aut?noma de Barcelona Edifici V, Campus UAB 08193 Cerdanyola del Vall?s- SPAIN Centro de Investigaci?n
2017 Jun 04
3
CentOS 7 install: closest mirror not supported?
Hi, Do CentOS 7 installs not automatically use a closest mirror for installing like Fedora does, or is that due to the way I'm starting the install (virt-install)? Background: I'm trying to find the best way to do installs using basic local media (network install, but *without* the need to download the squashfs.img for every install) but without a full local mirror. On Fedora (25), it
2008 Aug 26
2
String search: Return "closest" match
Hi, I have to match names where names can be recorded with errors or additions. Now I am searching for a string search function which returns always the "closest" match. E.g. searching for "Washington" it should return only Washington but not Washington, D.C. But it also could be that the list contains only "Hamburg" but the record I am searching for is
2009 Oct 10
2
Matching Dates Closest without going over
Hi, I have 2 date vectors d1 and d2. d1 <- structure(c(14526, 14495, 14464, 14433, 14402, 14371, 14340, 14309, 14278, 14247, 14216, 14185), class = "Date") d2 <- structure(c(14526, 14509, 14488, 14466, 14453, 14441, 14396, 14388, 14343, 14333, 14310, 14281), class = "Date") I would like to create another dataframe with columns d1 and d2, where d1 is the original d1
2009 Mar 22
4
Selecting closest values
Hi I have a table with ID (1 to 183) and Location (144 to -22). My problem is that I want to select the 10 ID's that are closest in Location to ID 1, ID 2 and so on. Also, some ID have the same Location. Say, if 11 ID's are closest to ID 100 I want to randomly choose one of the ID's to select 10 ID's total. Thank you -- View this message in context:
2010 May 26
3
Peak Over Threshold values
Dear List I hope you can help me: I?ve got a dataframe (df) within which I am looking for Peak Over Threshold values as well as the length of the events. An event starts when walevel equals 5.8 and it should end when walevel equals the lower threshold value (5.35). I tried ?clusters (?)? from ?evd package?, and varied r (see example) but it did not work for all events (again