similar to: data frame output in loops

Displaying 20 results from an estimated 20000 matches similar to: "data frame output in loops"

2004 Nov 26
2
plotting multiple series in one plot
say we have: > x<-data.frame(a=c(1,2,3,4,5),b=c(1,1,1.5,2,2)) > y<-data.frame(a=c(1,2,3,4,5),b=c(1,2,2,3,3)) How would I plot this so that, with the shared $a as the x-axis values, I have both $b columns plotted together? (a comparison of the two?) thanks. DISCLAIMER: This e-mail message and any attachments are inte...{{dropped}}
2004 Nov 17
8
referencing values of strings
Say you have a vector named x and a function which returns the character string "x" . How would I take "x" as an input and return the vector x? DISCLAIMER: This e-mail message and any attachments are inte...{{dropped}}
2002 Jul 29
2
Bug or feature in xyplot?
Hi, Can someone of you tell me why these two simple examples works as "expected", plot(c(1,1,2,2)~c(1,2,1,2),col=c(1,2,3,4),pch=c(1,2,3,4)) coplot(c(1,1,2,2)~c(1,2,1,2)|c("A","A","B","B"),col=c(1,2,3,4),pch=c(1,2,3,4 )) but when I try it with xyplot in the lattice package it fails.
2007 Apr 25
2
assigning two conditions to grep()
Hi, i have a problem in assigning 2 conditions to grep() , my data look like this: DA 24 N7 Rad= 3.4 20 Sac= 0.93 Acc= 4.76 DA 24 N7 Rad= 3.4 14 Sac= 0.65 Acc= 3.33 DA 24 N7 Rad= 3.4 3 Sac= 0.14 Acc= 0.71 DA 24 N7 Rad= 3.4 11 Sac= 0.51 Acc= 2.62 DG 23 N7 Rad= 3.4 8 Sac= 0.37 Acc= 1.91 DG 23 N7 Rad= 3.4 5 Sac= 0.23 Acc= 1.19 DG 23 N7 Rad= 3.4 0 Sac= 0.00 Acc= 0.00 DG 23 N7 Rad= 3.4 3 Sac=
2011 Dec 25
2
[LLVMdev] Using output from dragonegg
Howdy! I am trying to understand how to properly use dragonegg. I've gotten it on my machine and it runs everything and seems to compile fortran well. If I run this command: gcc-4.6 tests/hello_world.f -o hello_world.o -fplugin=./dragonegg.so -S -flto I get a bunch of LLVM code in the hello_world.o file. What do I do with it next if I want to execute it? I've tried llvm-as and llvm-nm but
2018 Apr 17
1
Minor glitch in optim()
Having worked with optim() and related programs for years, it surprised me that I haven't noticed this before, but optim() is inconsistent in how it deals with bounds constraints specified at infinity. Here's an example: # optim-glitch-Ex.R x0<-c(1,2,3,4) fnt <- function(x, fscale=10){ yy <- length(x):1 val <- sum((yy*x)^2)*fscale } grt <- function(x, fscale=10){ nn
2012 Aug 17
7
Remove several numbers from a sequence
Can anyone tell me how to remove several numbers for a sequence. For example: xx<- c(1,5,7,10) yy<-seq(1,10,1) how do I get take xx away from yy to get the new sequence 2,3,4,6,8,9 Many thanks in advance -- View this message in context: http://r.789695.n4.nabble.com/Remove-several-numbers-from-a-sequence-tp4640630.html Sent from the R help mailing list archive at Nabble.com.
2009 May 08
2
[LLVMdev] Some questions on the output formats of AliasSetTracker
Dear Staff, Here are some questions on the output formats of AliasSetTracker. The code is as below: int G1 = 9; int G2 = 5; int main() { int * XX; int * YY; XX = &G1; YY = XX; YY = &G2; XX = &G2; } The output for -anders-aa is: Alias Set Tracker: 5 alias sets for 4 pointer values. AliasSet[0xea6fb0,0] may alias, Mod/Ref 10 Call Sites: void ({ }*)*
2009 May 08
0
[LLVMdev] Some questions on the output formats of AliasSetTracker
On Thu, May 7, 2009 at 5:07 PM, <hc2428 at columbia.edu> wrote: > However, I am a little confused with these output. In Both anders-aa > and steens-aa, XX and YY should stay in the same AliasSet, and their > alias relationship should be May Alias, right? %XX and %YY are the results of alloca instructions (i.e. equivalent to the C expressions "&XX" and
2011 Nov 20
2
Adding two or more columns of a data frame for each row when NAs are present.
I am fairly new to R and would like help with the problem below. I am trying to sum and count several rows in the data frame yy below. All works well as in example 1. When I try to add the columns, with an NA in Q21, I get as NA as mySum. I would like NA to be treated as O, or igored. I wrote a function to try to count an NA element as 0, Example 3 function. It works with a few warnings,
2009 Feb 13
2
tapply bug? - levels of a factor in a data frame after tapply are intermixed
Hello! I have encountered a really weird problem. Maybe you've encountered it before? I have a large data frame "importances". It has one factor ($A) with 3 levels: 3, 9, and 15. $B is a regular numeric variable. Below I am picking a really small sub-frame (just 3 rows) based on "indices". "indices" were chosen so that all 3 levels of A are present:
2003 Jul 16
1
Tobit analysis
Having read previous correspondance on this topic, am I right in using a gaussian distribution for a tobit model, one article suggests a normal distribution? Also, I want to censure at the upper bound, so, using the survival5 package I use: survreg(Surv(y,y<c,type="right")~x) for a censored regression. Could anybody who's had experience of this, confirm whether I'm in the
2004 Feb 15
1
manova() with a data frame
I'm trying to learn to use manova(), and don't understand why none of the following work: > data(iris) > fit <- manova(~ Species, data=iris) Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : incompatible dimensions > fit <- manova(iris[,1:4] ~ Species, data=iris) Error in model.frame(formula, rownames, variables, varnames, extras,
2008 Feb 21
1
Save a group of matrix
Hello, I'm creating a loop to work with vegan, to get a species abundance curve. Here I send the script I've created and also an excel file to prove what it can do. Well, I have a database with 20 years, and each year we have sampled 19 stratum, and in each estratum we have carry out some sumpling. Then, with the script that I've sent I've got to calculate the species abundance
2006 Dec 08
1
missing factor levels in a lattice barchart panel cause unexpected failure
Hi all - I'm trying to generate lattice barchart graphs with missing values, and came across the following: This does not run. I would expect it to: library(lattice) D = data.frame(X=1, Y=factor(letters[2], letters[1:2])) barchart(~ X, D, groups=Y) Error in grid.Call.graphics("L_rect", x$x, x$y, x$width, x$height, resolveHJust(x$just, : invalid line type which is simply
2015 Aug 20
10
[Bug 91705] New: [NVE7] GPU crash (read fault) on boot w/ DMI+HDMI outputs
https://bugs.freedesktop.org/show_bug.cgi?id=91705 Bug ID: 91705 Summary: [NVE7] GPU crash (read fault) on boot w/ DMI+HDMI outputs Product: xorg Version: unspecified Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component:
2009 May 08
1
[LLVMdev] Some questions on the output formats of AliasSetTracker
Quoting Eli Friedman <eli.friedman at gmail.com>: Dear Eli, Thanks very much for your reply. I have modified the XX and YY to be global variables, but the output of AliasSetTracker are still MUST alias: Alias Set Tracker: 5 alias sets for 4 pointer values. AliasSet[0xea55d0,0] may alias, Mod/Ref 8 Call Sites: void ({ }*)* @llvm.dbg.func.start, void (i32, i32, { }*)*
2016 May 23
2
data frame method for as.table()
Hello, Currently it's possible to convert an object of class table to a data frame with as.data.frame.table(), but there's no ready-made function, AFAIK, to do the reverse operation, i.e. conversion of a data frame to a table. Do you think it would be a good idea to add a data.frame method to as.table(), to allow such conversions? The idea is that if `x' is a table and `y <-
2010 May 13
1
merge for data.frame and matrix
Hello, how to merge a data.frame and a matrix by one column in the data.frame and rownames of the matrix? df <- data.frame(col1=c("kk","yy","kk"),col2=c(6,4,3)) > df   col1 col2 1   kk    6 2   yy    4 3   kk    3 m<-matrix(c(3,8,56,9), nrow=2, dimnames = list(c("aa","kk"),c("col1","col2"))) > m    col1 col2 aa   
2008 Feb 29
2
while loop syntax help
Dear list, I'm trying to write my first looping function in R. After many hours of searching help files and previous posts, I'm at wits end. Please forgive my programming ignorance...any help is greatly appreciated. I need to sort through a vector (x) and identify the point at which 2 successive values become smaller than the previous value. I've written a "while"