search for: frame1

Displaying 20 results from an estimated 31 matches for "frame1".

Did you mean: frame
2002 Jan 18
2
length of dimnames???
...or (see also the full transcript below): Error in as.matrix.data.frame(x) : length of dimnames[2] not equal to array extent I do not know what it means and could not find how to get around that in the manual nor in the R search page. Any idea? Thanks, jp ----------------------------- > frame1 <- read.table("/Users/gattuso/zRdata/coca/oceanic.txt", >header=TRUE,sep=",") > frame2 <- read.table("/Users/gattuso/zRdata/coca/cellids.txt", >header=TRUE,sep=",") > frame1$celltype <- frame2[match(frame1$ID,frame2$ID),2] > frame...
2011 Apr 05
2
Help to check data before putting it in a database
The example scene: I have a database with stats about each goal made by my soccer team. This database (a data frame in R) is organized in lines (goals) with a set of columns containing data about these goals (player name, tactic position, etc). For now, this database will be called "data.frame1". What I need is to feed this "data.frame1" with new information about my team goals. I will call this new information "data.frame2". This set of new goals is organized in the same way as in "data.frame1" (equal numbers of cols). Where help is needed: I need he...
2008 May 26
1
To draw observation [m, n] from 20 data frames named frame1, ... , frame20
Hi all, I have 20 data frames, named frame1, ... , frame20. Each data frame has the dimension 20x5. I need to build a function that calls out the observation in Row 1, Col 2 from all 20 data frames and places it in a vector of length 20. I have tried the following code: vect <- rep(0,20) for(i in 1:20){ vect[i] <- paste("f...
2007 Aug 14
2
Question about unicode characters in tcltk
...Greek letters and subscripts into a tcltk menu. The code creates all the mu's, and the 1 and 2 subscripts, but it won't create the 0. Is there a certain set of characters that R won't recognize the unicode for? Or am I input the \u2080 incorrectly? library(tcltk) m <-tktoplevel() frame1 <- tkframe(m) frame2 <- tkframe(m) frame3 <- tkframe(m) entry1 <- tkentry(frame1,width=5,bg='white') entry2 <- tkentry(frame2,width=5,bg='white') entry3 <- tkentry(frame3,width=5,bg='white') tkpack(tklabel(frame1,text='\u03bc\u2080'),side='left...
2005 Aug 12
2
coercing created variables into a new data frame using na.omit()
Hi, I am an R newbie and one thing I am having trouble with binding variables that I have created within one data frame into a new data frame when using na.omit(). To illustrate this problem I will give the example I am working on and the approah I have been using:- data.frame1<-filepath.... attach(data.frame1) #create a new variable using a function new.variable<-rep(1,length(weight3)) for (x in 1:length(new.variable)) {f<-((((age1[x]-7)*(weight[x]-mw))+((age2[x]-7)*(weight2[x]-mw))+((age3[x]-7)* (weight3[x]-mw)))/(((age1[x]-7)^2)+((age2[x]-7)^2)+((age3[x]-7)^2...
1999 Mar 01
1
"xpdrows.data.frame" (PR#131)
...a.frame"??? By the way, how to debug this example under windows? debug() doesnt accept the functions used (.Primitive), and R wont run under gdb --- may have to do with R.dll, from the manual for gdb i get it that it cannot debug functions in shared libraries? copied: Using the data frames frame1 and frame2 from the attached saved dataset frame.dat (say load("frame.dat") ): > for (i in 1:11) { + frame1[i, ] <- frame2[i, ] } Error: couldn't find function "xpdrows.data.frame" --- What is function xpdrows.data.frame? There should be an more appropiate...
2000 Apr 27
1
Equivalent of S> assign( , ,frame=1)
Hi, I'm new to R, and I certainly miss an obvious point. I looked in the doc and the archieve, but could not find what is the R equivalent of the S assign( , ,frame=1). I guess the question is like what is the equivalent of the S frames and how to access them. As an example: oneprog <- function() { initial() res <- subrout() return(res) } initial <- function() { assign
2012 Jan 14
3
add column with values found in another data frame
I am positive this problem has a very simple solution, but I have been unable to find it, so I am asking for your help. I need to know how to look something up in one data frame and add it as a column in another. If I have a data frame that looks like this: > frame1 ID score test age 1 Guy1 10 1 20 2 Guy1 13 2 20 3 Guy2 9 1 33 4 Guy2 11 2 33 and another frame that looks like this: > frame2 ID 1 Guy1 2 Guy2 How do I add a column to frame2 so it looks like this: ID age 1 Guy1 20 2 Guy2 33 I know this must be simple, but I couldn't find t...
2003 Mar 11
0
Interrater and intrarater reliability
...or each rater in adjacent columns. # rho0inter: null hypothesis value of the interrater reliability coefficient # rho0intra: null hypothesis value of the intrarater reliability coefficient # conf.level: confidence level of the one-sided confidence intervals reported for the reliability coefficients Frame1<-data.frame(cbind( rep(1:nsubj,nrater*nmeas),rep(1:nrater,rep(nsubj*nmeas,nrater)), rep(rep(1:nmeas,rep(nsubj,nmeas)),nrater), matrix(as.matrix(Results),ncol=1))) names(Frame1)<-c('Subject','Rater','Repetation','Result') Frame1$Subject<-factor(Frame1$Subj...
2010 Jan 20
1
Merge and join data
Hi, I'm looking to combine two data frames. Several of the columns are in common while the others need to be summed up. The apply functions and the merge functions don't seem to be working. I've included a basic example of what I'm trying to do below. Thanks! Sean data.frame1<-as.data.frame(matrix(c('winter','dredge','515',100,150),1,5)) names(data.frame1)<-c('Season','Gear','Area','COD','POLL') data.frame2<-as.data.frame(matrix(c('winter','dredge','515',13,24,18),1,6)) nam...
2011 Nov 10
1
grid.pack and grid.frame bewilder me
Hello R friends, I get quite confused in using the grid graphic function grid.pack( ) and grid.frame ( ). Here is a simple example: library(grid) grid.frame(name="frame1") grid.pack("frame1",rectGrob(width=unit(0.5,"npc"), height=unit(0.5,"npc"), gp=gpar(col="red"))) what I expect is a rectangle with half the default device's dimensions,but it returns a rectangle like 1/4 of the device.why? In addition wonder what...
2003 Jun 08
1
Need help on data frame
...ponding to every day. Problem is that there are some gap i.e. observation couldn't be done on some particular day. I want to place this data frame like exact data frame (every year it will change, Feb 28 or feb29) Maybe I need to make one coulmn of date (for each year, say this dataframe 'frame1'), then I need to place data set on frame1 with missing entry as NA. Then I want to change this NA as mean of precceeding and following entries (for EACH NA) Hope it is possible by using R. I will greatly appreciate any help. Thanks, Pratibha ____________________________________________...
2013 Feb 13
3
match in dependence of 2 columns
Hello, i want to match a column of one data.frame to another, my problem is, that i only want to match the data, if 2 columns are equal. i have a example: data.frame1 cu.nr. name value A 1 Evo 100 B 1 Mer 80 C 2 Ford 50 And now i want to match the value to data.frame 2 in dependence...
2006 Oct 16
3
lda
I'm trying to do a linear discriminant analysis on a dataset of three classes ("Affinities"), using the MASS library: > data.frame2 <- na.omit(data.frame1) > > data.ld = lda(AFFINITY ~ ., data.frame2, prior = c(1,1,1)/3) Error in var(x - group.means[g, ]) : missing observations in cov/cor What does this error message mean and how can I get rid of it? Thanks! Pieter
2002 Jan 02
1
Combining files
Hi: I am a very recent user of R 1.40 for MacOSX and went through the help files but did not not find the function that I am looking for. I have two comma separated files which I want to partly combine. File 1 has 49670 lines and 26 columns (separated by commas) and looks like this: ...
2004 Aug 26
4
Column names of a data frame
I'm coming out with all the classic problems today ;-) Can anyone tell me how to change the column names of an already existing data frame? I've read the docs for ?data.frame and ?as.data.frame but can't figure it out. I want to make a new data.frame from some of the columns of an existing data.frame, but when I do that, the new data.frame columns have the same names as the old
2008 Aug 04
0
AEC
Hi,I'am new to speex,i have a question: Suppose i have two frames:frame1(5ms),frame2(10ms),And i don't want to do aec in middle 5ms frame. Can i just link them in frame1(5ms)....000000(5ms).....frame2(15ms),then do AEC with recorded buffer(20ms)? _________________________________________________________________ ???MSN??????????????????? http://mobile.msn.com.cn/ --...
2002 Jun 27
1
Simple Matrix plot question
Hello. I'd like to produce a simple pairs-like plot with two data frames - but not a traditional scatter-plot matrix - just multiple bivariate plots of data.frame1[i] vs data.frame2[i] ... In other words, given data frames X and Y, I'd like multiple plots on a page like: Y1 Y2 Y3 X1 X2 X3 Thanks in advance. -R -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~horni...
2003 Mar 12
0
avoiding excel's odbc limit on number of columns
...el 2000, odbc driver v. 03.51; my knowledge of sql = $\epsilon$.] Gratefully, alejandro > #Sheet1 has 92 rows and 256 columns; its structure is roughly as follows: > # [blank] 0 1 2 ... 254 > # 0 70 70 71 ... 63 > # [89 rows deleted] > # 90 57 56 52 ... 37 > frame1 <- sqlQuery(channel, "select * from [Sheet1$]") > frame1 [1] "[RODBC] ERROR: Could not SQLExecute" [2] "S1001 -1040 [Microsoft][ODBC Excel Driver] Too many fields defined." > odbcGetInfo(channel) [1] "EXCEL version 08.00.0000. Driver ODBC version 03.51&qu...
2010 Sep 29
2
Adding two data.frames.
Hi I have two data frames that contains the same sort of data and I want do add them together to get one big data frame, anyone know how to do that? ex: data.frame1 A B C 1 2 3 4 5 6 7 8 9 and data.frame2 A B C 9 8 7 6 5 4 3 2 1 Would then become one big set: data.frame3 A B C 1 2 3 4 5 6 7 8 9 9 8 7 6 5 4 3 2 1 Thx for your help //Joel -- View this message in context: http://r.789695.n4.nabble.com/Adding-two-data-frames-tp2718771p2718771.html Sent fro...