similar to: Extracting dataframe rows containing NAs in one column

Displaying 20 results from an estimated 700 matches similar to: "Extracting dataframe rows containing NAs in one column"

2008 Mar 06
1
Sweave and the prompt
Hi the list I would also like to remove the prompt, in order to let the reader cut-and-paste from pdf to R. So I set the prompt to " " with options(prompt=" ",continue=" ") But it add an extrat space at the start of each line. I also try some code options(prompt="\a",continue="\a") After a big figth in my office (my college did not like my new
2007 Dec 17
1
Xen console hangs
Hello, I''m running XEN 3.0.3 on RHEL5 2.6.18-53.1.4.el5xen. I used to start the vm with "xm create myvm -c". I see the boot during a couple of second, then, it freeze. The console is freezed, not the vm, a couple of second later, I can ssh the vm without any problem. "xm console myvm" also display a freezed state. This is an extrat of the console : # xm
2016 May 25
1
Slow RAID Check/high %iowait during check after updgrade from CentOS 6.5 -> CentOS 7.2
On 2016-05-25 19:13, Kelly Lesperance wrote: > Hdparm didn?t get far: > > [root at r1k1 ~] # hdparm -tT /dev/sda > > /dev/sda: > Timing cached reads: Alarm clock > [root at r1k1 ~] # Hi Kelly, Try running 'iostat -xdmc 1'. Look for a single drive that has substantially greater await than ~10msec. If all the drives except one are taking 6-8msec, but one is very
2012 Nov 07
3
HELP! Excel and R give me totally different regression results using the exact same data
Hallo, I am totally confused why Excel and R give me totally different regression results for the data below. If you know the solution, please enlighten me. In Excel I used LINEST() and Data>Data Analysis>Regression and both (fortunately) gave the same result. The coefficients were: /b0=1.16, b1=0.957, b2=0.024, R2=0.0027, adjusted R2=-0.017/ In R I used
2012 Mar 28
1
CI with confint
Hello all, I'm trying to use confint from the MASS package to compute confidence intervals for an nls object. When I plot the results, however, they don't make sense - lines cross over the fitted model or just don't match the data. Code is : Thanks for help dat<-data.frame(a,b) with(dat, plot(a,b)) model<-(nls(b~(1/exp(a*x))*n, data=dat, start=list(x=.001,n=20),
2008 Mar 02
1
question on lag.zoo
Hi Guys, I'm using zoo package now. I found lag is not doing what I assumed. > x <- zoo(11:21) > z <- zoo(1:10, yearqtr(seq(1959.25, 1961.5, by = 0.25)), frequency = 4) > x 1 2 3 4 5 6 7 8 9 10 11 11 12 13 14 15 16 17 18 19 20 21 > lag(x) 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 > z 1959 Q2 1959 Q3 1959 Q4 1960 Q1 1960 Q2 1960 Q3 1960 Q4
2005 Jul 04
5
#include not working with *1.0.9
We are running * V1.0.9 on a demo box. We have set up everything in our dialplan and we have a directory where we store individual extension settings. That directory is called "extensions-phones.d" and it contains a number of .conf files. In my extensions.conf file I have put a #include "extensions-phones.d/*.conf" in my [globals] context If we reload and restart *, and
2009 Aug 13
1
R code to reproduce (while studying) Bates & Watts 1988
Hi R users, I'm here trying to understand correlated residuals in nonlinear estimation. I'm reading/studying the book Bates, D. M. and D. G. Watts, (1988), /Nonlinear regression analysis and its applications/, Wiley, NY. pages 92-94, trying to reproduce the figures and to find out the code in R to perform the necessary calculations. I also consulted Pinheiro and Bates, but without
2012 Dec 17
1
subset handling
Dear Rui and UseRs,[a text file has also been attached, in case the format of my email is difficult to get]I am extremely sorry that I am bothering you once again, but I?ll have to get to the bottom of it. The following command sp <- lapply(split(agg, agg$st), function(x) x[order(x$year, x$month), ]) gave me an output with monthly mean of population(as under). i am not able to apply
2005 Nov 25
1
Can't bind to 0.0.0.0 port 655/tcp: Permission denied
Hellou I found a interesting problem with my tinc instalation: Log messages from main router. tinc.vpn1[1959]: tincd 1.0pre7 starting tinc.vpn1[1959]: /dev/tun is a Linux tun/tap device tinc.vpn1[1959]: Can't bind to 0.0.0.0 port 655/tcp: Permission denied tinc.vpn1[1959]: Unable to create any listening socket! tinc.vpn1[1959]: Unrecoverable error #cat
2017 Jul 05
4
Help with reshape/reshape2 needed
Hi all: I'm struggling with getting my data re-formatted using functions in reshape/reshape2 to get from: 1957 0.862500000 1958 0.750000000 1959 0.300000000 1960 0.287500000 1963 0.675000000 1964 0.937500000 1965 0.025000000 1966 0.387500000 1969 0.087500000 1970 0.275000000 1973 0.500000000 1974 0.362500000 1976 0.925000000 1978 0.712500000 1979 0.337500000 1980 0.700000000 1981 0.425000000
2017 Jul 05
0
Help with reshape/reshape2 needed
This does not use reshape/reshape2, but it is pretty straightforward. Assuming X is your example data: > Y <- split(X[, 2], X[, 1]) > vals <- sapply(Y, length) > pad <- max(vals) - vals > Y2 <- lapply(seq_along(Y), function(x) c(Y[[x]], rep(NA, pad[x]))) > names(Y2) <- names(Y) > X2 <- do.call(cbind, Y2) > X2[, 1:6] 1957 1958 1959
2008 Jan 10
1
question about subset and join ts object(s)
Hi, I have two questions about ts. (1) How do I subset a ts object and still preserve the time index? for example: > x=ts(1:10, frequency = 4, start = c(1959, 2)) # the ts object > x Qtr1 Qtr2 Qtr3 Qtr4 1959 1 2 3 1960 4 5 6 7 1961 8 9 10 I don't want the 1st 2 elements, so I could subset like this: > x[3:length(x)] [1] 3 4 5 6 7 8 9 10
2017 Jul 05
0
Help with reshape/reshape2 needed
The reason it doesn't work easily with reshape/reshape2 is that the order of the rows is not determined. Your answer could be 1957 1958 ... 1985 1986 0.8625000 0.7500000 ... 0.7307692 0.23750000 0.0733945 0.6435644 ... NA 0.05769231 0.5096154 NA ... NA 0.65137615 or 1957 1958 ... 1985 1986 0.0733945 0.6435644 ... NA
2017 Jul 05
1
Help with reshape/reshape2 needed
Hi Tom, Or perhaps: #assume the data frame is named "tadf" library(prettyR) stretch_df(tadf,1,2) Jim On Thu, Jul 6, 2017 at 6:50 AM, Ista Zahn <istazahn at gmail.com> wrote: > The reason it doesn't work easily with reshape/reshape2 is that the > order of the rows is not determined. Your answer could be > > 1957 1958 ... 1985 1986 >
2012 Nov 01
2
Subsetting year range
Hi, I have a panel data set that I am trying to subset. I am trying to keep values for years >=1960. The full set is from 1940 to 2000. I tried a few things, but none worked. Here are a couple that I am trying to use. TableAPS1 <- subset(TableAP, year => 1959) TableAPS1 <- TableAP[ which(year > 1959),] It would be really nice if someone can point out what I am doing wrong
2011 Dec 13
2
[Bug 1959] New: Incorrect Sequence Numbers for NetFlow v9 export.
https://bugzilla.mindrot.org/show_bug.cgi?id=1959 Bug #: 1959 Summary: Incorrect Sequence Numbers for NetFlow v9 export. Classification: Unclassified Product: softflowd Version: -current Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: softflowd
2007 Jan 10
1
map data.frame() data after having linked them to a read.shape() object
Dear all, I try to first link data in a data.frame() to a (polygon) read.shape() object and then to plot a polygon map showing the data in the data.frame. The first linking is called "link" in ArcView and "relate" in ArcMap. I use the code shown below, though without success. Help with this would be greatly appreciated. Thanks! Tord require(maptools) # Read shape file
2011 Sep 07
1
reshaping data
I have the following data (see RawData using dput below) How do I get it in the following 3 column format (CO2 measurements are the elements of the original data frame). I'm sure the package reshape is where I should look, but I haven't figured out how. Thanks ahead of time Month Year CO2 J 1958 F 1958 M 1958 315.71 A 1958 317.45 M.1 1958 317.5 J.1 1958 J.2 1958 315.86 A.1 1958
2008 Nov 04
1
perform Kruskal-Wallis test without using the built-in command in R
Hi, again i am stuck in my presentation, and i have never learn R before in my life but need this to be done, so please help me out for a favour: http://www.nabble.com/file/p20333155/kew.dat kew.dat run this in R and these comes up: Month Year Rain 1 Jan 1900 74.400000 2 Feb 1900 80.500000 3 Mar 1900 23.600000 4 Apr 1900 23.600000 5 May 1900 25.100000 6