similar to: Problem Subsetting Rows that Have NA's

Displaying 20 results from an estimated 9000 matches similar to: "Problem Subsetting Rows that Have NA's"

2017 Oct 25
4
Problem Subsetting Rows that Have NA's
On 10/25/2017 4:38 AM, Ista Zahn wrote: > On Tue, Oct 24, 2017 at 3:05 PM, BooBoo <booboo at gforcecable.com> wrote: >> This has every appearance of being a bug. If it is not a bug, can someone >> tell me what I am asking for when I ask for "x[x[,2]==0,]". Thanks. > You are asking for elements of x where the second column is equal to zero. > >
2017 Oct 25
0
Problem Subsetting Rows that Have NA's
On Tue, Oct 24, 2017 at 3:05 PM, BooBoo <booboo at gforcecable.com> wrote: > This has every appearance of being a bug. If it is not a bug, can someone > tell me what I am asking for when I ask for "x[x[,2]==0,]". Thanks. You are asking for elements of x where the second column is equal to zero. help("==") and help("[") explain what happens when
2017 Oct 25
0
Problem Subsetting Rows that Have NA's
> On Oct 25, 2017, at 6:57 AM, BooBoo <booboo at gforcecable.com> wrote: > > On 10/25/2017 4:38 AM, Ista Zahn wrote: >> On Tue, Oct 24, 2017 at 3:05 PM, BooBoo <booboo at gforcecable.com> wrote: >>> This has every appearance of being a bug. If it is not a bug, can someone >>> tell me what I am asking for when I ask for "x[x[,2]==0,]". Thanks.
2018 Jan 02
1
httr::content without message
Thanks to all that replied. I had just looked through the httr code and sure enough for a .csv mime time it calls readr::read_csv(). The httr::content docs suggest not using automatic parsing in a package, rather to determine mime type and parse yourself and Ben's suggestion also works if I do: junk <- readr::read_csv(r1$content, col_types = cols()) Perfect. Using httr rather than
2017 Sep 06
1
rgdal error when trying to import raster
Indeed, Ben, but the question was something more like it is not a Dependency, just Suggested, so why the error... John: If you read the Introduction to the 'raster' package vignette, it indicates that some input formats are supported within the raster package and some rely on other packages. Clearly the attempt to read a TIFF was an example of the latter. Had you used a different input
2017 Aug 06
1
Nested for loop
Hi Ben, That's exactly right! Except for each set it's the sample population that is 400, 800 or 300. I want to take 3 samples, each of 100, where only the population differs. I can do this separately, but I'm having trouble putting them all on the same graph. I'd like to have sample on the x axis (1-300) and estimate on the y axis. I want to show how population affects the
2017 Dec 16
5
Generating help files for a function
Hello everyone! I'm in the process of writing a package, and I'm using the lovely "R Package" book as a guideline. However, in the midst of my work, I discovered that I had omitted a function and am now putting in it the package. Not a problem. But the problem is the help file. What is the best way to generate a help file "after the fact" like that, please? Thank
2017 Dec 16
0
Generating help files for a function
Hi, If you are using roxygen-style function documentation then why not use devtools::document()? Ben > On Dec 16, 2017, at 9:00 AM, Erin Hodgess <erinm.hodgess at gmail.com> wrote: > > Hello everyone! > > I'm in the process of writing a package, and I'm using the lovely "R > Package" book as a guideline. > > However, in the midst of my
2017 Sep 06
2
rgdal error when trying to import raster
Dear useRs, I am trying to import a raster with the line: nlcd <- raster("/home/jpolo/NRI/nlcd_nri5000.tif") And I keep getting an error like this: "Warning message: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,? : ? there is no package called 'rgdal' Error in .rasterObjectFromFile(x, band = band, objecttype =
2018 Jan 02
4
httr::content without message
Hi All: I am using httr to download files form a service, in this case a .csv file. When I use httr::content on the result, I get a message. Since this will be in a package. I want to suppress the message, but haven't figured out how to do so. The following should reproduce the result: myURL <-
2018 Jan 02
0
httr::content without message
Ahoy! That's a message generated by the readr::read_table() function (or it's friends). You can suppress it a number of ways, but this should work as httr::content() will pass through arguments, like col_types = cols(), to the file reader. junk <- httr::content(r1, col_types = cols()) See more here... https://blog.rstudio.com/2016/08/05/readr-1-0-0/
2017 Sep 06
0
rgdal error when trying to import raster
Hi, The message "there is no package called 'rgdal'" means that you don't have rgdal installed. https://cran.r-project.org/web/packages/rgdal/index.html Also, you will get very good patial-centric help if you subscribed to r-sig-geo here https://stat.ethz.ch/mailman/listinfo/r-sig-geo Cheers, Ben > On Sep 6, 2017, at 2:52 PM, john polo <jpolo at mail.usf.edu>
2018 Jan 17
3
roxygen2 error - x$tag operator is invalid for atomic vectors
Hi, I am trying to create my first R package. I will later today put the files on Github. However I gets this error and I can't find any reason for it: R> roxygen2::roxygenise() First time using roxygen2. Upgrading automatically... Error in x$tag : $ operator is invalid for atomic vectors R> Any ideas? Regards Martin M. S. Pedersen [[alternative HTML version deleted]]
2017 Aug 05
2
Nested for loop
Hi! Thanks for taking the time to read this. The code below creates a graph that takes 100 samples that are between 5% and 15% of the population (400). What I'd like to do, however, is add two other sections to the graph. It would look something like this: from 1-100 samples take 100 samples that are between 5% and 15% of the population (400). From 101-200 take 100 samples that are between
2017 Aug 06
0
Nested for loop
Hi Kirsten, I can run your example code but I can't quite follow your division of sampling. Can you restate the the task? Below is what I think you are asking for, but I have the feeling I may be off the mark. Set A: 400 samples, draw 100 in range of 5 to 15 Set B: 800 samples, draw 100 in range of 5 to 15 Set C: 300 samples, draw 100 in range of 5 to 15 Ben > On Aug 5, 2017, at
2017 Aug 17
3
really dumb question with building/creating a new package.
Hello. I am creating a new RcmdrPlugin package. However, I am getting some very odd messages. R CMD build RcmdrPlugin.gstats_1.0.0 ERROR cannot change to directory ?RcmdrPlugin.gstats_1.0.0? es-macbook-air:~ emhodgess$ R CMD check RcmdrPlugin.gstats_1.0.0 Warning: ?RcmdrPlugin.gstats_1.0.0? is neither a file nor directory, skipping es-macbook-air:~ emhodgess$ cd RcmdrPlugin.gstats/
2009 May 21
4
Re placing a "+" in a string
I know this is easy, but I am stumped: > gsub("0","K","8.00+00") [1] "8.KK+KK" > gsub("+","K","8.00+00") Error in gsub("+", "K", "8.00+00") : invalid regular expression '+' In addition: Warning message: In gsub("+", "K", "8.00+00") : regcomp error:
2009 Feb 01
2
Extracting Coefficients and Such from mle2 Output
The mle2 function (bbmle library) gives an example something like the following in its help page. How do I access the coefficients, standard errors, etc in the summary of "a"? > x <- 0:10 > y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8) > LL <- function(ymax=15, xhalf=6) + -sum(stats::dpois(y, lambda=ymax/(1+x/xhalf), log=TRUE)) > a <- mle2(LL,
2008 Jun 17
1
Simultaneous Confidence/Prediction Bands
Is there a built-in function in R that will generate simultaneous confidence and prediction bands for linear regression? Tom -- View this message in context: http://www.nabble.com/Simultaneous-Confidence-Prediction-Bands-tp17941537p17941537.html Sent from the R help mailing list archive at Nabble.com.
2008 Sep 24
1
How do I Convert "<1" to the number 1?
Is there an elegant way in R to change a number reported as a less-than number in text format, "<1" for example, to the numeric equivalent 1? I have been trying to use as.numeric, but have not come up with anything clever yet. Tom -- View this message in context: http://www.nabble.com/How-do-I-Convert-%22%3C1%22-to-the-number-1--tp19651018p19651018.html Sent from the R help