similar to: NA, deleting rows

Displaying 20 results from an estimated 40000 matches similar to: "NA, deleting rows"

2008 Feb 10
2
reshape
Dear colleagues, I'd like to reshape a datafame in a long format to a wide format, but I do not quite get what I want. Here is an example of the data I've have (dat): sp <- c("a", "a", "a", "a", "b", "b", "b", "c", "d", "d", "d", "d") tr <- c("A",
2003 Dec 18
2
barplot & plot together
Dear colleges, I'm trying to combine a barplot and a plot in a single figure as follows: data <- 1:6 t <- barplot(data, axes=F) par(new= T) plot(t, data, type="b") However, as you can see in the example, the dots of the second plot do not fall in the midpoint of the bars in the first. Any trick for setting the 2 plots at the same scale? I have unsuccessfully tried: plot(t,
2001 Dec 18
4
chi-squared test
I don't quite understand the difference between the two methods for performing a chi-squared test on contingency tables: summary(table()) and chisq.test() They may different results. E.g.: aa <- gl(2, 10) bb <- as.factor(c(1,2,2,2,1,2,1,2,2,2,1,2,2,2,1,1,1,2,1,1)) aa <- c(aa, aa) bb <- c(bb, bb) table(aa, bb) summary(table(aa, bb)) chisq.test(aa, bb) Could somebody give me
2003 Apr 24
1
matrix to coordinates
Dear R-users, I'm sure it must be a specific function or a better way to convert matrix to x,y,z coordinates (and viceversa), than my function below (it works). Any help? m2coord <- function(m) { k <- nrow(m)*ncol(m) aa <- data.frame(r=1:k, c=1:k, v=1:k) k <- 0 for (i in 1:nrow(m)) for (j in 1:ncol(m)) { k <- k+1 aa$f[k]=i; aa$c[k]=j; aa$v[k]=m[i,j] } aa } Juli
2011 May 14
1
By default, `names<-` alters S4 objects
Hi, I was stumped by this. The two S4 objects below looked exactly the same: > a1 An object of class "A" Slot "aa": integer(0) > a2 An object of class "A" Slot "aa": integer(0) > str(a1) Formal class 'A' [package ".GlobalEnv"] with 1 slots ..@ aa: int(0) > str(a2) Formal class
2011 Jul 26
2
Big data and column correspondence problem
Greetings, I've been struggling for some time with a problem concerning a big database that i have to deal with. I'll try to exemplify my problem since the database is really big. Suppose I have the following data: AA = c(4,4,4,2,2,6,8,9) A1 = c(3,3,5,5,5,7,11,12) A2 = c(3,3,5,5,5,7,11,12) A = cbind(A, A1, A2) BB = c(2,2,4,6,6) B1 =c(5,11,7,13,NA) B2 =c(3,12,11,NA,NA) B3
2017 Aug 25
2
retrieve machine password in current Samba?
We have a wireless network that uses 802.1x authentication, in which domain joined computers use their machine credentials to connect. Windows machines do this automatically, and until recently Linux computers could join using wicd, wpa-supplicant, and a simple script that would retrieve the machine password with tdbdump. ( specifically tdbdump -k SECRETS/MACHINE_PASSWORD/DOMAIN
2012 Nov 22
1
ayuda con Merge
Estimados usuarios de R: Tengo dos data frames, A y B, donde hay algunas variables comunes y otras distintas. En el A tengo las variables, a1, a2, a3, a4, a5. En el B tengo las variables a1, a2, a3, b1, b2, b3,b4, b5, b6, b7. Los valores llave son a1 y a2, al data frame B quiero pegarle las variables a4 y a5 y en el caso no se tenga ningun valor en la variable a3, ponerle el valor que aparece
2011 Jul 04
1
placing multiple rows in a single row
Dear people from the R help list, I have a question that I can't get my head around to start answering, that is why I am writing to the list. I have data in a format like this (tabs might look weird): John A1 1 0 1 John A2 1 1 1 John A3 1 0 0 Mary A1 1 0 1 Mary A2 0 0 1 Mary A3 1 1 0 Peter A1 1
2010 Jun 08
3
partial matches across rows not columns
Hi R users, I am trying to omit rows of data based on partial matches an example of my data (seal_dist) is below: A quick break down of my coding and why I need to answer this - I am dealing with a colony of seals where for example A1 is a female with pup and A1.1 is that female's pup, the important part of the data here is DIST which tells the distance between one seal (ID) and another
2008 Jul 31
2
sort rows of matrix by rows of another matrix
Hello all, I am trying to sort rows of one matrix by rows of another. Given a1 and a2: ------ > a1 [,1] [,2] [,3] [1,] 7 6 8 [2,] 4 2 4 [3,] 4 7 2 [4,] 0 3 8 a1 <- structure(c(7, 4, 4, 0, 6, 2, 7, 3, 8, 4, 2, 8), .Dim = c(4L, 3L)) > a2 [,1] [,2] [,3] [1,] 101 102 103 [2,] 101 102 103 [3,] 101 102 103 [4,] 101 102 103 a2 <-
2010 Apr 20
1
how to select the last non-'NA' observation in a row
I have a matrix of the following form: time id 0 2 4 6 9 12 14 3 9 8 NA NA NA NA NA 7 3 NA 3 NA 3 NA 4 13 11 6 7 NA 5 NA 6 ..... I hope for each row to select the last observation which is not 'NA'. For example, for the first row, id=3, the value I want to select is 8 for the second row, id=7, the value I want to select is 4 for the third row, id=13, the
2013 May 03
3
color by group in ggplot
Hey, I have a dataset like this: ID Var1 Var2 Group A1 1 1 BB A2 1 2 AA B1 2 1 CC B2 1 3 DD C1 1 2 EE I would like to plot the points of Var1 and Var2, use "ID" as X-axis, but color the points by "Group". I can
2014 Mar 07
4
Cannot chain to another PXE server on the same subnet
On Fri, Mar 7, 2014 at 2:33 AM, Vieri <rentorbuy at yahoo.com> wrote: > So I take it it's more of a DHCP hack in which: > 1- client boots and gets DHCP response from 10.215.144.7 with PXE syslinux info > 2- client loads pxelinux.0 menu and selects menu that chains to Altiris PXE menu except, instead of calling pxechain.com or pxechn.c32 with the Altiris server's IP address,
2007 Feb 02
5
reading very large files
Hi all, I have a large file (1.8 GB) with 900,000 lines that I would like to read. Each line is a string characters. Specifically I would like to randomly select 3000 lines. For smaller files, what I'm doing is: trs <- scan("myfile", what= character(), sep = "\n") trs<- trs[sample(length(trs), 3000)] And this works OK; however my computer seems not able to handle
2001 Sep 25
2
glm.nb, anova.negbin
Dear R-collegues, I'm getting an error message (Error in round) when summarising a glm.nb model, and when using anova.negbin (in R 1.3.1 for windows): > m.nb <- glm.nb(tax ~ areal) > m.bn Call: glm.nb(formula = tax ~ areal, init.theta = 5.08829537115498, link = log) Coefficients: (Intercept) areal 3.03146 0.03182 Degrees of Freedom: 283 Total (i.e. Null); 282
2008 Sep 23
1
Summing up columns with NA elements in a data frame
Hi all, When I try to sum a few columns in a data frame (which has NA?s randomly distributed as elements), I am not able to get the summing operation to ignore the NA?s. Let me explain with the following code : ################################? a<-structure(list(a1 = c(NA, 2, 3, NA, 5, 6, NA, 8, 9, NA), a2 = c(NA, + 4, 5, 5, NA, 7, 8, 8, NA, 10), a3 = c(2, NA, 6, 8, NA, 12, 14, + NA, 18, 20)),
2015 Apr 19
2
[LLVMdev] remove redundant load by GVN() does not work
Hi, Assume I have the following code. The first four instructions in each BB does the same thing. So I think GVN() can remove the redundant code. However, after I apply GVN to my module by "Passes.add(createGVNPass())" and "Passes.run(*myModule)". It seems GVN does not remove the redundant instructions. Can anyone give me a hint what's going on here? Any hint is
2019 Jun 03
2
Question about a AA result and its use in Dependence Analysis
It seems the same bug is there if we do pointer swapping with selects. Do you agree? (see example below) define void @f() { entry: %a1 = alloca float, align 4 %a2 = alloca float, align 4 br label %loop end: ret void loop: %phi = phi i32 [ 0, %entry ], [ 1, %loop ] %select_cond = icmp eq i32 %phi, 0 %ptr1 = select i1 %select_cond, float* %a1, float* %a2 %ptr2 = select i1
2005 Oct 04
1
repeated measures with random effects
Dear all, I'm interested in analysing a reapeated measure desing where plant height (H) was measured 3 times (Time). The experimental design include 2 fixed factor (say A and B) in which A is nested in B, and a random factor (C, the plot), using the aov(). So my first idea would be something like: aov(H ~ B * A %in% B * Time + Error(id) ) where id is the factor coded for the repeated