Displaying 20 results from an estimated 2000 matches similar to: "Splitting a data frame into several completely separate data frames"
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
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
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 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
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
2011 Sep 30
0
Data simulation for ANOVA decomposition into sums of squares
Dear listserv,
Please consider the following dataset:
x <- matrix(nrow = 8, ncol = 2)
colnames(matrix) <- c("classification", "soluble_fiber")
x[1:4,1] <- "bagel"
x[5:8,1] <- "donut"
How would I simulate a dataset for a one-way fixed-effect ANOVA (where "classification" is the treatment variable and "soluble_fiber" is the
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);
> }
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 Jun 09
1
Subset columns by prefix
Hello R listserve,
I would appreciate someone's help with this problem. Consider the following toy dataset:
x <- read.table(textConnection("worldclim.1 worldclim.2 cru.1 cru.2
indv.1 7 8 32 658
indv.2 7 7 39 422"), header = TRUE)
How could I create a subset of the data based on the column prefix? For instance, let's say I wanted to subset only the columns with the
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 =
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
2008 Mar 15
1
[LLVMdev] Question on use of subregs
Thanks, I seem to have gotten sub-registers to work. I can't seem to suppress
the zero-extend sometimes. There is no need to explicitly zero extend bytes to
words on this machine as all byte operations do that.
I have also gotten some memory-to-memory to work.
Bagel
Evan Cheng wrote:
> On Mar 14, 2008, at 10:17 AM, Bagel wrote:
>
>> I'm trying to write a backend for a
2017 Feb 17
2
multiprecision add/sub
On 02/16/2017 12:08 PM, Stephen Canon wrote:
>> On Feb 16, 2017, at 9:12 AM, Bagel <bagel99 at gmail.com
>> <mailto:bagel99 at gmail.com>> wrote:
>>
>> I figured that the optimization of this would bedifficult (else it would
>> have already been done :-))
>
> Don’t make this assumption. There’s lots of opportunities for optimization
> scattered
2003 Aug 26
3
Subsetting a dataframe
Hi R-people
I have a question concerning subsetting. I have a dataframe which contains among other variables the variable "subject". For each subject number there are several rows, e.g.:
subject treatment concentration day
19 a 15,4 1
19 a 18,3 2
19 a 2,3 3
etc.
Im trying to subset the dataframe to get for
2010 Nov 24
0
[LLVMdev] question on the status of debugging symbols
On 23 November 2010 18:03, Bagel <bagel99 at gmail.com> wrote:
> Would someone be so kind as to tell me what the status of debugging symbols
> (DWARF) generated by clang/llvm is?
Hi Bagel,
It should be fairly complete...
> When I generate an executable with "clang -g" followed by "llc -O0" and feed it
> to gdb, I get "no debugging symbols found".
2017 Mar 07
2
multiprecision add/sub
> On Feb 21, 2017, at 9:54 PM, Nemanja Ivanovic via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> I believe that providing additional intrinsics that would directly produce the ISD::ADDC/ISD::SUBC nodes would provide the additional advantage of being able to directly produce these nodes for code that doesn't have anything to do with multiprecision addition/subtraction. I am
2011 Jun 24
2
[LLVMdev] multiple return value assembler regression?
On 06/24/2011 03:45 PM, Chris Lattner wrote:
>
> On Jun 24, 2011, at 9:29 AM, Bagel wrote:
>
>> It appears the syntax for returning multiple values has changed since 2.9.
>> Previous to that:
>> ret i32 %a, i32 %b
>> worked. The new syntax is something like:
>> ret { i32, i32 }{i32 %a, i32 %b}
>> but this yields an error:
>> mrv-bug.ll:5:24:
2008 Mar 14
0
[LLVMdev] Question on use of subregs
On Mar 14, 2008, at 10:17 AM, Bagel wrote:
> I'm trying to write a backend for a machine that has both byte and
> word
> instructions. Both varieties of instructions operate on the same
> set of
> general registers. A byte mode instruction on a general register
> always clears
> the upper bits. Register-to-register byte mode and work mode
> instructions set
2009 Aug 13
3
[LLVMdev] Branch Relaxation Support?
I think I have read that there are plans to generate object code (e.g. ELF)
directly in addition to assembly language source. If so, are there plans to
support branch relaxation for targets which support long/short branch
displacements? This is typically done in assemblers.
thanks,
bagel
2010 Nov 23
3
[LLVMdev] question on the status of debugging symbols
Would someone be so kind as to tell me what the status of debugging symbols
(DWARF) generated by clang/llvm is?
I am on a linux x86-64 system (Fedora 13). Is gdb supposed to understand the
generated DWARF?
When I generate an executable with "clang -g" followed by "llc -O0" and feed it
to gdb, I get "no debugging symbols found".
What is the status of lldb on