Displaying 20 results from an estimated 900 matches similar to: "Using data( ) in a loop"
2010 Jun 21
2
Return value associated with a factor
I am using the code below to extract census tract information.
save.tract$state, save.tract$county and save.tract$tract are returned as
factors. In the last three statements, I need to save the actual value of
the factor, but, instead, the code is yielding the position of the factor.
How do I instead return the value of the factor?
By way of example, for Lon=-82.49574 and Lat=29.71495, the code
2012 Sep 14
1
USCensus2000 package
Does anyone know the appropriate R code to obtain census tracts (tract
and block level) from addresses by using Zack Almquist's USCensus2000
package?
Thank you,
--
Michael Leitson
Michael.Leitson at gmail.com
2010 Mar 14
2
code rows depending on the value of other rows in multilevel dataframe
I have a multilevel dataframe (df):
ID Date Segment Slice Tract Lesion
1 CSPP005 12/4/2007 1 1 LCST 0
2 CSPP005 12/4/2007 1 1 LPC 2
3 CSPP005 12/4/2007 1 1 RPC 3
4 CSPP005 12/4/2007 1 1 RCST 1
5 CSPP005 12/4/2007 1 1 LGM 0
6 CSPP005 12/4/2007 1 1
2018 Mar 19
1
Labelling a fortified GADM map plotted with ggplot and geom_map
I am having trouble getting data labels to display over the provinces in a GADM map of Canada.
Specifically, I need the variable "Number" from the data set "by_province", grouped by "region", to appear on the corresponding regions of the map.
The data set "by_province" looks like this:
long lat order hole piece region
2009 Dec 13
3
CRAN (and crantastic) updates this week
CRAN (and crantastic) updates this week
New packages
------------
* Bergm (1.0)
Alberto Caimo
http://crantastic.org/packages/Bergm
Functions implementing Bayesian estimation for exponential random
graph models via exchange algorithm
Updated packages
----------------
lmtest (0.9-26), logcondens (1.3.5), MTSKNN (0.0-4), pmml (1.2.21),
r2lUniv (0.9.4), rattle (2.5.11), rgdal (0.6-23),
2015 Nov 04
2
Vectorizing structure reads, writes, etc on X86-64 AVX
Hi Jay -
I see the slow, small accesses using an older clang [Apple LLVM version
7.0.0 (clang-700.1.76)], but this looks fixed on trunk. I made a change
that comes into play if you don't specify a particular CPU:
http://llvm.org/viewvc/llvm-project?view=revision&revision=245950
$ ./clang -O1 -mavx copy.c -S -o -
...
movslq %edi, %rax
movq _spr_dynamic at GOTPCREL(%rip),
2023 Oct 14
2
Create new data frame with conditional sums
Well, here's one way to do it:
(dat is your example data frame)
Cutoff <- seq(0, .15, .01)
Pop <- with(dat, sapply(Cutoff, \(p)sum(Totpop[Pct >= p])))
I think there must be a more efficient way to do it with cumsum(), though.
Cheers,
Bert
On Sat, Oct 14, 2023 at 12:53?AM Jason Stout, M.D. <jason.stout at duke.edu> wrote:
>
> This seems like it should be simple but I
2004 Apr 04
1
How to improve this code?
Hi all,
I've got some functioning code that I've literally taken hours to
write. My 'R' coding is getting better...it used to take days :)
I know I've done a poor job of optimizing the code. In addition, I'm
missing an important step and don't know where to put it.
So, three questions:
1) I'd like the resulting output to be sorted on distance (ascending)
and
2023 Oct 13
1
Create new data frame with conditional sums
This seems like it should be simple but I can't get it to work properly. I'm starting with a data frame like this:
Tract Pct Totpop
1 0.05 4000
2 0.03 3500
3 0.01 4500
4 0.12 4100
5 0.21 3900
6 0.04 4250
7 0.07 5100
8 0.09
2012 Aug 15
1
Obtaining census tract data from addresses
Hello,
I have a bunch of street addresses that I want to obtain the census
tract data for. Is there any way I can do this in R?
Thank you,
--
Michael Leitson
Michael.Leitson at gmail.com
2015 Nov 03
2
Vectorizing structure reads, writes, etc on X86-64 AVX
----- Original Message -----
> From: "Sanjay Patel via llvm-dev" <llvm-dev at lists.llvm.org>
> To: "Jay McCarthy" <jay.mccarthy at gmail.com>
> Cc: "llvm-dev" <llvm-dev at lists.llvm.org>
> Sent: Tuesday, November 3, 2015 12:30:51 PM
> Subject: Re: [llvm-dev] Vectorizing structure reads, writes, etc on X86-64 AVX
>
> If the
2013 Jan 29
1
points rejected as lying outside the specified window
Hello,
I am using the following code to create ppp files from csv data and map shape files, but I am getting some errors which I have been unable to fix by searching them online:
library(spatstat)
library(maps)
library(maptools)
NYC2<-readShapePoly("nybb.shp") # this is a map of the NYC boroughs without waterways and no census tract divisions (but it does include lines separating
2015 Nov 03
2
Vectorizing structure reads, writes, etc on X86-64 AVX
Thank you for your reply. FWIW, I wrote the .ll by hand after taking
the C program, using clang to emit the llvm and seeing the memcpy. The
memcpy version that clang generates gets compiled into assembly that
uses the large sequence of movs and does not use the vector hardware
at all. When I started debugging, I took that clang produced .ll and
started to write it different ways trying to get
2020 Aug 06
2
How to make a subdirectory in a lit test?
Yeah, the llvm-ar tests are working on Windows. But I'm getting different
results when I try to use the same commands in an LLDB lit test. Maybe
there's something messed up in LLDB's local lit config?
If I have `mkdir %t/subdir` in my lit test, I get either file-not-found or
a complaint about "unrecognized option /subdir."
The one-and-only mkdir on my PATH is
2004 Aug 06
1
Query r/e multiple decoder reset...
Hello! I should have asked this earlier, but... :)
We're returning to voice processing in our app now, in which we're trying
to achieve n-way full duplex voice in a 3d environment. Since Speex is a
single voice stream CODEC, we've been looking at having each client upload
its stream to the servers, which multiplex several spatially nearby active
channels back down to the
2023 Oct 14
1
Create new data frame with conditional sums
That's very helpful and instructive, thank you!
Jason Stout, MD, MHS
Box 102359-DUMC
Durham, NC 27710
FAX 919-681-7494
________________________________
From: John Fox <jfox at mcmaster.ca>
Sent: Saturday, October 14, 2023 10:13 AM
To: Jason Stout, M.D. <jason.stout at duke.edu>
Cc: r-help at r-project.org <r-help at r-project.org>
Subject: Re: [R] Create new data frame with
2023 Oct 15
2
Create new data frame with conditional sums
Under the hood, sapply() is also a loop (at the interpreted level). As
is lapply(), etc.
-- Bert
On Sun, Oct 15, 2023 at 2:34?AM Jason Stout, M.D. <jason.stout at duke.edu> wrote:
>
> That's very helpful and instructive, thank you!
>
> Jason Stout, MD, MHS
> Box 102359-DUMC
> Durham, NC 27710
> FAX 919-681-7494
> ________________________________
> From: John
2020 Aug 06
2
How to make a subdirectory in a lit test?
I'm writing a lit test that needs to temporarily make a subdirectory.
I tried:
```
// RUN: mkdir %t/subdir
```
But on Windows, it's hard to bypass the built-in mkdir to use a Posix-style
one from Git or GnuWin. The built-in mkdir believes the `/subdir` is an
unrecognized command flag. I figure I cannot just use a backslash because
that would fail on Posix systems. (The test should
2009 Jul 27
1
Cross-validating two matrices
Hello,
I am trying to help a colleague with an R problem (see below) to whit
I can only generate a very inelegant solution. Any advice would be
welcome.
Thanks,
Brian
If you have two matrices, say a species by trait matrix (Matrix 1
below) and a plot by species matrix (Matrix 2 below), is there a
straightforward way to prune one matrix so that the species list
matches those in a
2006 Mar 30
1
Random Coefficients using coxme
Hello, I was hoping someone could answer a question for me that may
either be statistical or script related. I don't come from a statistics
background, so I am not positive if I am using the correct nomenclature
or even the correct procedure. Is it possible to model "random
coefficients" in a mixed effects cox-regression using coxme from the
Kinship package? For example, using