Displaying 20 results from an estimated 4000 matches similar to: "Subset columns by prefix"
2010 Mar 13
2
Indexing a matrix within loops
Hi,
I was hoping someone could help me with the following problem. Consider this toy example. For the input dataset there are four individuals (rows "indv.1" through "indv.4"), measured for two different variables (columns "var.1" and "var.2") at two different levels of a factor (column "factor.level"). I want to calculate a matrix that has the
2010 Sep 26
2
Splitting a data frame into several completely separate data frames
Hello again,
How do I split a data frame into smaller, completely separate data frames
(rather than separate data frames comprising a single "list")? Consider the
following data, and my coding attempt:
x <- read.table(textConnection("id type number
indv.1 bagel 6
indv.2 bagel 1
indv.3 donuts 10
indv.4 donuts 9"), header = TRUE)
closeAllConnections()
x.split <-
2010 Jun 09
2
Change the name of one column ONLY
Hi all,
I have a very simple problem that I cannot seem to find the answer to. Consider the following toy dataset:
x <- read.table(textConnection("V1 apples bananas cherries
indv.1 7 8 4 3
indv.2 7 7 4 9"), header = TRUE)
How would I change the column name of ONLY the first column, not the others? Surely I should not have to re-specify the names of ALL the columns -- e.g.,
2010 Jul 12
3
Continuing on with a loop when there's a failure
Hi R sages,
Here is my latest problem. Consider the following toy example:
x <- read.table(textConnection("y1 y2 y3 x1 x2
indv.1 bagels donuts bagels 4 6
indv.2 donuts donuts donuts 5 1
indv.3 donuts donuts donuts 1 10
indv.4 donuts donuts donuts 10 9
indv.5 bagels donuts bagels 0 2
indv.6 bagels donuts bagels 2 9
indv.7 bagels donuts bagels 8 5
indv.8 bagels donuts bagels 4 1
indv.9
2011 May 21
4
[LLVMdev] getCanonicalInductionVariable
Hi
I have the followed code for which I am writing a loop pass.
int main() {
int i = 0;
for (i=0; i<20; i++) {
printf ("hello world %d\n", i);
}
return 0;
}
In the function runOnLoop, I have the following instruction
PHINode *indv = NULL;
indv = L->getCanonicalInductionVariable();
However, when I check indv is always set to NULL.
Since the code has a canonical
2010 Apr 16
2
Scanning only specific columns into R from a VERY large file
Hi,
I turn to you, the R Sages, once again for help. You've never let me down!
(1) Please make the following toy files:
x <- read.table(textConnection("var.1 var.2 var.3 var.1000
indv.1 1 5 9 7
indv.210000 2 9 3 8"), header = TRUE)
y <- read.table(textConnection("var.3 var.1000"), header = TRUE)
write.csv(x, file = "x.csv")
write.csv(y, file =
2011 May 22
0
[LLVMdev] getCanonicalInductionVariable
Hi,
What does your LLVM IR look like. Are you sure the loop hasnt been optimized
away?
Arushi
On Sat, May 21, 2011 at 5:52 PM, Malveeka Tewari <mtewari at eng.ucsd.edu>wrote:
> Hi
>
> I have the followed code for which I am writing a loop pass.
>
> int main() {
> int i = 0;
> for (i=0; i<20; i++) {
> printf ("hello world %d\n", i);
> }
2008 Mar 07
3
Combine two columns
Is there a way to combine two columns within a data frame?
Example data:
id snp AL1 AL2
1500 30 A B
1510 30 A A
1520 30 A B
This is what I would like:
indv snp AL1AL2
1500 30 AB
1510 30 AA
1520 30 AB
Any help is greatly appreciated.
Alysta
2024 Oct 10
1
Anuncio del paquete de R, paisaje, para el análisis del paisaje y la biodiversidad
Estimada comunidad de R,
Les hago llegar el anuncio del paquete de R, paisaje, para el análisis del
paisaje y la biodiversidad.
https://github.com/ManuelSpinola/paisaje
El paquete está en desarrollo. Hasta ahora he incorporado estas funciones:
*calculate_it_metrics*: Calculate 5 information theory landscape metrics
*count_points_in_polygons*: Count Points within Polygons
*create_cat_esa_10m*:
2024 Oct 10
1
Anuncio del paquete de R, paisaje, para el análisis del paisaje y la biodiversidad
Estimado
Que bueno, pero no entiendo nada.
Me parece muy bueno y me llama la curiosidad, observo nc = st_read <https://r-spatial.github.io/sf/reference/st_read.html>(system.file <https://rdrr.io/r/base/system.file.html>("shape/nc.shp", package="sf?)) y no tengo ni idea que es el archivo .shp.
¿Podría usted colocar algún ejemplo, por ahí si no es complicado se
2010 Oct 20
2
[PATCH] klibc: reproducible builds
From: Maciej ?enczykowski <maze at google.com>
This adds a new setting: KBUILD_REPRODUCIBLE
If it is non-empty, ar and ranlib will be called in such
a way that timestamps do not affect the build output.
This allows one to get perfectly reproducible builds.
Signed-off-by: Maciej ?enczykowski <maze at google.com>
---
scripts/Kbuild.klibc | 14 +++++++++-----
usr/klibc/Kbuild |
2009 Apr 03
0
[LLVMdev] build error on libLLVMSystem.a without any useful error message
Nicolas Raynaud wrote:
> Thanks for your reply,
>
> Perl is implied ???
>
> here is the version :
> nraynaud at macaron-2:~/Desktop/geek/fp$ perl --version
>
> This is perl, v5.8.8 built for darwin-thread-multi-2level
> (with 2 registered patches, see perl -V for more detail)
>
> the two patches are :
> Locally applied patches:
> fix for regcomp
2010 May 03
2
advice?
All-
Thank you in advance for any help you might be able to lend. Here is
my issue. I am trying to open a fairly large .dat file. The file
originally was downloaded as a GZ file but I unzipped it (with 7-zip) into
it's current 1.86 gig .dat format. I know that the data is "just a plain
ASCII file with 720 columns and 360 rows per time step (month). It should be
readable by
2010 Jul 20
1
Nesting functions in loops that result in error messages breaking the loop
Hello all,
I am trying to write a program in R in which I call a function multiple
times within a loop. The problem is that sometimes the function breaks down
while calling another function, and produces an error message that breaks my
loop and the program stops. I would like to keep the loop running when this
function breaks down, and just move on to the next iteration in the loop.
Is there
2010 Jun 19
1
Extracting P-values from the lrm function in the rms library
Hello again R users,
I have a devilishly hard problem, which should be very simple. I hope someone out there will have the answer to this on the tip of their tongue.
Please consider the following toy example:
x <- read.table(textConnection("y x1 x2
indv.1 bagels 4 6
indv.2 donuts 5 1
indv.3 donuts 1 10
indv.4 donuts 10 9
indv.5 bagels 0 2
indv.6 bagels 2 9
indv.7 bagels 8 5
indv.8
2007 Jun 27
1
lme correlation structures
Hi all,
I've been using SAS proc mixed to fit linear mixed models and would
like to be able to fit the same models in R. Two things in particular:
1) I have longitudinal data and wish to allow for different repeated
measures covariance parameter estimates for different groups (men and
women), each covariance matrix having the same structure. In proc
mixed this would be done by specifying
2009 Apr 03
2
[LLVMdev] build error on libLLVMSystem.a without any useful error message
Thanks for your reply,
Perl is implied ???
here is the version :
nraynaud at macaron-2:~/Desktop/geek/fp$ perl --version
This is perl, v5.8.8 built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)
the two patches are :
Locally applied patches:
fix for regcomp CVE-2007-5116 security vulnerability
fix for double-free CVE-2008-1927 security
2008 Dec 03
1
how to handle irregularly spaced data as timeseries
I have a set of modeled climate data recorded at irregular intervals.
The format of the data is such that there are monthly measurements for
the years 2000, 2020, 2050, 2080, etc. Therefore I have 12 regular
records, a skip of some number of years, then 12 more monthly records,
another skip, and so on.... I created a dataframe from .txt with the
read.table() command. For starters I need
2003 Nov 29
1
[PATCH] ash not make -j safe, make spotless updates
some files depend on nodes.h, but there is no dependency for that fact.
olaf@mandarine:~/klibc-0.87> grep -Er 'include.*nodes.h' ash/ | sed 's-^[^/]\+/\([^.]*\).*-\1.o-' | xargs echo OBJ_NODES =
OBJ_NODES = cd.o eval.o exec.o expand.o jobs.o main.o nodes.o options.o parser.o redir.o show.o trap.o var.o
make spotless doesnt work reliable, the patch adds a few more targets.
Is
2001 Nov 20
2
rename file1 -> file2: No such file or directory
I'm rsyncing from an linux box to a win2k box with a precompiled version
of rsync for win2k. durring the procces he gives me a lotte of the
following
errors (with different filenames):
rename
realother/Maildir/cur/.1005882149.8001_0.nyx.wildape,S=3080:2,.001002 ->
realother/Maildir/cur/1005882149.8001_0.nyx.wildape,S=3080:2, : No such
file or
directory
I user the command:
rsync -cru