similar to: exclude

Displaying 20 results from an estimated 10000 matches similar to: "exclude"

2018 May 18
1
exclude
Thank you Bert and Jim, Jim, FYI , I have an error message generated as Error in allstates : object 'allstates' not found Bert, it is working. However, If I want to chose to include only mos years example, 2003,2004,2007 and continue the analysis as before. Where should I define the years to get as follow. 2003 2004 2007 AL 2 1 1 NY 1 1 2 Thank you
2018 May 18
0
exclude
... and similar to Jim's suggestion but perhaps slightly simpler (or not!): > cross <- xtabs( Y ~ stat + year, data = tdat) > keep <- apply(cross, 1, all) > keep <- names(keep)[keep] > cross[keep,] year stat 2003 2004 2006 2007 2009 2010 AL 38 21 20 12 16 15 NY 50 51 57 98 183 230 > ## for counts just do: > xtabs( ~ stat + year, data
2017 Dec 14
1
match and new columns
Hi Bill, I put stringsAsFactors = FALSE still did not work. tdat <- read.table(textConnection("A B C Y A12 B03 C04 0.70 A23 B05 C06 0.05 A14 B06 C07 1.20 A25 A23 A12 3.51 A16 A25 A14 2,16"),header = TRUE ,stringsAsFactors = FALSE) tdat$D <- 0 tdat$E <- 0 tdat$D <- (ifelse(tdat$B %in% tdat$A, tdat$A[tdat$B], 0)) tdat$E <- (ifelse(tdat$B %in% tdat$A, tdat$A[tdat$C], 0))
2017 Dec 13
2
match and new columns
Thank you Rui, I did not get the desired result. Here is the output from your script A B C Y D E 1 A12 B03 C04 0.70 0 0 2 A23 B05 C06 0.05 0 0 3 A14 B06 C07 1.20 0 0 4 A25 A23 A12 3.51 1 1 5 A16 A25 A14 2,16 4 4 On Wed, Dec 13, 2017 at 4:36 PM, Rui Barradas <ruipbarradas at sapo.pt> wrote: > Hello, > > Here is one way. > > tdat$D <- ifelse(tdat$B %in% tdat$A,
2017 Dec 14
0
match and new columns
Use the stringsAsFactors=FALSE argument to read.table when making your data.frame - factors are getting in your way here. Bill Dunlap TIBCO Software wdunlap tibco.com On Wed, Dec 13, 2017 at 3:02 PM, Val <valkremk at gmail.com> wrote: > Thank you Rui, > I did not get the desired result. Here is the output from your script > > A B C Y D E > 1 A12 B03 C04 0.70 0 0
2017 Dec 13
3
match and new columns
Hi all, I have a data frame tdat <- read.table(textConnection("A B C Y A12 B03 C04 0.70 A23 B05 C06 0.05 A14 B06 C07 1.20 A25 A23 A12 3.51 A16 A25 A14 2,16"),header = TRUE) I want match tdat$B with tdat$A and populate the column values of tdat$A ( col A and Col B) in the newly created columns (col D and col E). please find my attempt and the desired output below Desired output
2010 Nov 01
2
transforming a dataset for association analysis RESHAPE2
I get the following message when using the reshape2 package line > tDat.m<- melt(Dataset) Using Item, Subject as id variables > tDatCast<- acast(tDat.m,Subject~Item) Aggregation function missing: defaulting to length Note Problem Statement- convert dataframe Subject Item Score 1 Subject 1 Item 1 1 2 Subject 1 Item 2 0 3 Subject 1 Item 3 1 4 Subject 2 Item 1 1 5
2012 Nov 17
3
Reshaping a dataframe
Seems like this should be easy but I'm struggling a bit. How do I rearrange a data frame to go from the first one to the second shown below ? State Date lbs TX 200701 400 TX 200702 650 TX 200703 950 TX 200704 1000 FL 200701 200 FL 200702 300 FL 200703 500 FL 200704 333 NJ 200701 409 NJ 200702 308 NJ 200703 300 NJ 200704 800 Date TX FL NJ 200701 400 200 409 200702 650
2011 Jul 14
9
Extension wise dialplan
Hi all, I have n no. of extensions in my dialer. from 456 to 556 extensions. I was created 2 other extensions 667 and 668 I need to allow only STD calls to go from this extensions. These all extensions are same context . I need to define the STD dialplan for only this 2 extensions. how I can ? Best Regards, Mahesh Katta *BUZZ**WORKS* Business Services Private Limited BANGALORE | CHENNAI |
2017 Dec 13
0
match and new columns
Hello, Here is one way. tdat$D <- ifelse(tdat$B %in% tdat$A, tdat$A[tdat$B], 0) tdat$E <- ifelse(tdat$B %in% tdat$A, tdat$A[tdat$C], 0) Hope this helps, Rui Barradas On 12/13/2017 9:36 PM, Val wrote: > Hi all, > > I have a data frame > tdat <- read.table(textConnection("A B C Y > A12 B03 C04 0.70 > A23 B05 C06 0.05 > A14 B06 C07 1.20 > A25 A23 A12 3.51
2007 Dec 06
5
Help rewriting looping structure?
Hey Folks, Could somebody help me rewrite the following code? I am looping through all records across 5 fields to calculate the cumulative percentage of each record (relative to each individual field). Is there a way to rewrite it so I don't have to loop through each individual record? ##### tdat is my data frame ##### j is my field index ##### k is my record index ##### tsum is the sum of
2011 Jun 09
2
Problem with a if statement inside a function
I have a really long functions, and at the end of the function, I am using a if statement to tag certain keywords based on whether they have certain values contained in them. However, the if statement doesn't seem to work. When I had split up the commands into various functions, it worked fine, but I'm not sure what going on now that it's combined into a single function. myfunc
2010 Oct 30
2
transforming a dataset for association analysis
Hi I would like to transform a data frame like Subject Item Score Subject 1 Item 1 1 Subject 1 Item 2 0 Subject 1 Item 3 1 Subject 2 Item 1 1 Subject 2 Item 2 1 Subject 2 Item 3 0 .... *to * Subject Item1 Item2 Item3 .....Item N Subject1 1 0 1 Subject2 1 1 0 ........ SubjectP.. Apologize for the simple nature of my query but I am stuck.
2012 Apr 20
1
Ternaryplot as an inset graph
Hello I am trying to add a ternary plot as a corner inset graph to a larger main ternary plot. I have successfully used add.scatter in the past for different kinds of plots but It doesn't seem to work for this particular function. It overlays the old plot rather than plotting as an inset. Here is a simple version of what I'm trying. Note that if I change the inset plot to be an ordinary
2007 Jun 26
1
Subscripting specified variables in a function
I'm trying to create a function which will allow me to subset a data set based on values of various specified variables. I also want to then apply some other function(s) (e.g., summary). This is what I've tried so far.... > test.fx <- function(dta, expvar, expval) { + newdta <- subset(dta, eval(expvar)>expval) + summary(newdta$eval(expvar)) + } > >
2007 Aug 11
1
xyplot() with segments() superposed?
In the hypothetical example below, how do I add two segments() into the two panels, respectively? Say segments(x0=5, y0=10, x1=5, y1=20) on the left and segments(x0=15, y0=-10, x1=15, y1=-2) on the right? Many thanks in advance, Yuelin Li. ps. part of the code came from a solution given by Deepayan Sarkar. ------------------- library(lattice) set.seed(12345) x <- 0:20 y.male.obs <- - 1.2
2016 Apr 22
1
npudens(np) Error missing value where TRUE/FALSE needed
Hi, I am looking for some help concerning the npudens function in the np package. I am trying to find a kernel density function of a multivariate dataset and the density evaluated at each of the 176 points. I have 2 continuous and 3 ordered discrete variables. My sample size is 176. So edata is a 176x(2+3) data frame, while tdat is a 1x(2+3) vector. bw_cx[i,] is a 1x (2+3) vector
2004 Sep 21
2
Bootstrap ICC estimate with nested data
I would appreciate some thoughts on using the bootstrap functions in the library "bootstrap" to estimate confidence intervals of ICC values calculated in lme. In lme, the ICC is calculated as tau/(tau+sigma-squared). So, for instance the ICC in the following example is 0.116: > tmod<-lme(CINISMO~1,random=~1|IDGRUP,data=TDAT) > VarCorr(tmod) IDGRUP = pdLogChol(1)
2018 Feb 25
3
include
Thank you Jim, I read the data as you suggested but I could not find K1 in col1. rbind(preval,mydat) Col1 Col2 col3 1 <NA> <NA> <NA> 2 X1 <NA> <NA> 3 Y1 <NA> <NA> 4 K2 <NA> <NA> 5 W1 <NA> <NA> 6 Z1 K1 K2 7 Z2 <NA> <NA> 8 Z3 X1 <NA> 9 Z4 Y1 W1 On Sat, Feb 24, 2018 at 6:18 PM, Jim
2018 Feb 25
2
include
HI Jim and all, I want to put one more condition. Include col2 and col3 if they are not in col1. Here is the data mydat <- read.table(textConnection("Col1 Col2 col3 K2 X1 NA Z1 K1 K2 Z2 NA NA Z3 X1 NA Z4 Y1 W1"),header = TRUE,stringsAsFactors=FALSE) The desired out put would be Col1 Col2 col3 1 X1 0 0 2 K1 0 0 3 Y1 0 0 4 W1 0 0 6 K2 X1