similar to: Problems using unique function and !duplicated

Displaying 20 results from an estimated 10000 matches similar to: "Problems using unique function and !duplicated"

2013 Apr 09
1
(no subject)
Hi I would like to normalize my data by one of the variables in long format. My data is like this: > t1<-data.frame(id=rep(1:3,rep(3,3)),dt=rep(1:3,rep(9,3)),var=c('num1','num2','norm'),value=rnorm(27)) > t1 id dt var value 1 1 1 num1 -1.83276256 2 1 1 num2 1.57034303 3 1 1 norm 0.60008563 4 2 1 num1 -0.96893477 5 2 1 num2 0.30423346 6
2010 Apr 20
2
having more than one plot in one figure
Hi All, I have been trying to plot multiple line plots with different colors on one figure. in my example below I was able to plot cat vs num1 as a dot plot connected with lines but was not able to do that for cat vs num2 and I do not know how to add the third plot cat vs num3. below is my code df <- data.frame(cat=1:10, num1=rnorm(10), num2=rnorm(10), num3=rnorm(10)) plot(df$num1,
2005 Sep 05
2
USING TWO ACCOUNTS WITH BROADVOICE
Hi, I have two accounts with broadvoice. Now, I want to be able to distinguish between them. I though that this would be simple by adding "/EXTEN" at the end of the register statement. For example: register => num1:pass@sip.broadvoice.com/1000 Unfortunately, this is not working. When I call into my box I hear busy tone. My config looks like this: [root@voip asterisk]# cat sip.conf
2006 Feb 09
1
List Conversion
Hello, I have a list (mode and class are list) in R that is many elements long and of the form: >length(list) [1] 5778 >list[1:4] $ID1 [1] "num1" $ID2 [1] "num2" "num3" $ID3 [1] "num4" $ID4 [1] NA I'd like to convert the $ID2 value to be in one element rather than in two.?? It shows up as c(\"num2\", \"num3\") if I try to use
2010 Feb 01
1
How to repeat "for" function?
Dear Users, I have one problem here, I tried many time and even read a few notes on writing function but still..... Can anyone help me on how to simplify Part B (please refer the programming below), so that I don't have to repeat the calculation of "num" and "r" ? Thank you very much..every help is very much appreciated... ## Part A n=1400 m=matrix(c(0,0,0,0),4,1)
2012 Sep 20
1
aggregate help
I want to count attributes of IDs: --8<---------------cut here---------------start------------->8--- z <- data.frame(id=c(10,20,10,30,10,20), a1=c("a","b","a","c","b","b"), a2=c("x","y","x","z","z","y"),
2011 Feb 16
1
confused by lapply
Description: 'lapply' returns a list of the same length as 'X', each element of which is the result of applying 'FUN' to the corresponding element of 'X'. I expect that when I do > lapply(vec,f) f would be called _once_ for each component of vec. this is not what I see: parse.num <- function (s) { cat("parse.num1\n"); str(s) s
2020 Aug 14
2
Another possible tracing feature for TableGen
I hacked around a bit with the simple case of tracing just classes and defs (no multiclasses or defms). Below you will see my test file and then the output produced. Note that the regular output from the PrintRecords backend follows the trace, so you can see the final classes and records there. Once the trace can be selective, it makes sense to add another option for PrintRecords that restricts
2007 Dec 01
1
creating conditional means
Hi all- I have a dataset (year, month, hour, co2(ppm), num1,num2) [49,] 2006 11 0 383.3709 28 28 [50,] 2006 11 1 383.3709 28 28 [51,] 2006 11 2 383.3709 28 28 [52,] 2006 11 3 383.3709 28 28 [53,] 2006 11 4 383.3709 28 28 [54,] 2006 11 5 383.3709 28 28 [55,] 2006 11 6 383.3709 28 28 [56,] 2006 11 7 383.3709 28 28 [57,] 2006
2013 Jun 11
1
mapply on multiple data frames
Hi all- I am wondering about using the mapply function to multiple data frames. Specifically, I would like to do a t-test on a subset of multiple data frames. All data frames have the same structure. Here is my code so far: f<-function(x,y) { test<-t.test(x$col1[x$col3=="num",],v$col2[x$col3=="num",],paired=T,alternative="greater") out<-test$p.value
2006 Oct 30
4
read.fwf and header
Hi! I have data (also in attached file) in the following form: num1 num2 num3 int1 fac1 fac2 cha1 cha2 Date POSIXt 1 1 f q 1900-01-01 1900-01-01 01:01:01 2 1.0 1316666.5 2 a g r z 1900-01-01 01:01:01 3 1.5 1188830.5 3 b h s y 1900-01-01 1900-01-01 01:01:01 4 2.0 1271846.3 4 c i t x 1900-01-01 1900-01-01 01:01:01 5 2.5 829737.4 d j u w 1900-01-01 6 3.0
2006 Oct 30
4
read.fwf and header
Hi! I have data (also in attached file) in the following form: num1 num2 num3 int1 fac1 fac2 cha1 cha2 Date POSIXt 1 1 f q 1900-01-01 1900-01-01 01:01:01 2 1.0 1316666.5 2 a g r z 1900-01-01 01:01:01 3 1.5 1188830.5 3 b h s y 1900-01-01 1900-01-01 01:01:01 4 2.0 1271846.3 4 c i t x 1900-01-01 1900-01-01 01:01:01 5 2.5 829737.4 d j u w 1900-01-01 6 3.0
2002 Nov 27
1
read.table: colClasses when num. of columns is unknown
Hi, I am looking for a way to read tables that have general structure of characterTag num1 num2 ... i.e. one character column followed by an unknown to the caller (but fixed throughout the file) number of numeric columns. I wanted to improve the speed of read.table by using colClasses, but that seemed to require knowledge of the actual number of columns in the file. For example I tried
2009 Aug 17
0
Call back DIALSTATUS is empty
Hi, Here is my problem. I am trying to get the Status of the call if the user picked up the phone or not. It is coming as empty. Please help. Here is my extensions_additional.conf file code: [multi-dir-callback] include => multi-dir-callback-custom exten => _X.,1,Answer exten => _X.,n,Playback(beep) exten =>
2003 Jun 23
1
strange problem
hi, running dovecot-0.99.10-rc2 on NetBSD, client is Entourage on MacOS 9.2. sylpheed on NetBSD does not show this behaviour. --snip-- Jun 23 16:28:15 host imap(user): file mail-index.c: line 619 (mail_index_lookup_uid_range): assertion failed: (first_uid > 0 && last_uid > 0) --snap-- any hints? thanks, TOM -------------- next part -------------- A non-text attachment was
2004 Sep 01
5
dtmf problem
Hello! I have asterisk updated from CVS on 31/8/2004 with sample configuration. I have just changed the sip.conf to register asterisk with sip proxy in out intranet. Then I can successfully make call to asterisk and go to demo IVR, but no response to dtmfs. I try to make call from several sip phones: Cisco7960, Ata186, Snom200. All of them send telephone-event in INVITE, but asterisk answers
2017 Aug 16
3
LLVM JIT Compilation
ok i have managed to compile using lli (jit) as follows: but i dont get assembly file? my sum-main.c file is: #include <stdio.h> #include<stdlib.h> int sum(int a, int b) { return a + b; } int main(int argc, char** argv) { printf("sum: %d\n", sum(atoi(argv[1]), atoi(argv[2])) + sum(atoi(argv[1]), atoi(argv[2]))); return 0; } and i used the following steps to compile. clang
2009 Aug 07
1
Gauss-Laguerre using statmod
I believe this may be more related to analysis than it is to R, per se. Suppose I have the following function that I wish to integrate: ff <- function(x) pnorm((x - m)/sigma) * dnorm(x, observed, sigma) Then, given the parameters: mu <- 300 sigma <- 50 m <- 250 target <- 200 sigma_i <- 50 I can use the function integrate as: > integrate(ff, lower= -Inf, upper=target)
2004 Aug 17
5
Bug in colnames of data.frames?
Hi, I am using R 1.9.1 on on i686 PC with SuSE Linux 9.0. I have a data.frame, e.g.: > myData <- data.frame( var1 = c( 1:4 ), var2 = c (5:8 ) ) If I add a new column by > myData$var3 <- myData[ , "var1" ] + myData[ , "var2" ] everything is fine, but if I omit the commas: > myData$var4 <- myData[ "var1" ] + myData[ "var2" ] the name
2009 Sep 22
3
converting a character vector to a function's input
Hi all, I have been trying to solve this problem and have had no luck so far. I have numeric vectors VAR1, VAR2, and VAR3 which I am trying to cbind. I also have a character vector "VAR1,VAR2,VAR3". How do I manipulate this character vector such that I can input a transformed version of the character vector into cbind and have it recognize that I'm trying to refer to my numeric