search for: colindex

Displaying 9 results from an estimated 9 matches for "colindex".

2012 Oct 23
1
Summary of variables with NA, empty
...that are NA,blank,etc? Basically all Null values, Empty strings, white space, blank values. Ideally it would look something like the below: # it should only includes the fields with NAs, blanks, etc. Added bonus would be to include column Index. #Valid Records = records that are not NA, blank,etc #ColIndex - what place is column in the original dataframe...1,2,3, ...xth Valid Records Null (NA?) Empty String White Space Blank Value ColIndex Var1 52 8...
2012 Nov 25
1
Error : Error in if (antipodal(p1, p2))
...maxcnt <- max(fsub$cnt) for (j in 1:length(fsub$airline)) { air1 <- airports[airports$iata == fsub[j,]$airport1,] air2 <- airports[airports$iata == fsub[j,]$airport2,] inter <- gcIntermediate(c(air1[1,]$long, air1[1,]$lat), c(air2[1,]$long, air2[1,]$lat), n=100, addStartEnd=TRUE) colindex <- round( (fsub[j,]$cnt / maxcnt) * length(colors) ) lines(inter, col=colors[colindex], lwd=0.8) } -- View this message in context: http://r.789695.n4.nabble.com/Error-Error-in-if-antipodal-p1-p2-tp4650712.html Sent from the R help mailing list archive at Nabble.com.
2002 Apr 30
1
data.frame package?
Is there a library that is able for example to 1. merge 2 dataframes by row eg.: rbind(dataframe1, dataframe2):data.frame 2. delete a column from a dataframe del(dataframe, colname) or del(dataframe, colindex= 1):data.frame? 3. Select lines from a dataframe by a specific function ? select(dataframe, func=small(x){x<1}, colindex=3): data.frame? 4. converting all double columns of a data.frame to a matrix. datafram_to_matrix(dataframe1):matrix If not would not it be usefull to have such a library on...
2013 Feb 09
1
R maps Help
...1:length(fsub$airline)) { air1 <- airports[airports$iata == fsub[j,]$airport1,] air2 <- airports[airports$iata == fsub[j,]$airport2,] p1 <- c(air1[1,]$long, air1[1,]$lat) p2 <- c(air2[1,]$long, air2[1,]$lat) inter <- clean.Inter(p1,p2,n=100, addStartEnd=TRUE) colindex <- round( (fsub[j,]$cnt / maxcnt) * length(colors)) lines(inter, col=colors[colindex], lwd=0.1) } } map_usa <- function(){ xlim <- c(-171.738281, -56.601563) ylim <- c(12.039321, 71.856229) map("world", col="#191919", fill=TRUE, bg="#736F6E&quot...
2003 Nov 12
4
column extraction by name ?
I have a data frame (df) with colums x, y and z. e.g. df <- data.frame(x = sample(4), y = sample(4), z = sample(4)) I can extract column z by: df$z or df[3] I can also extract columns x,y by: df[1:2] or by df[-3]. Is it possible to extract x,y columns in a "symbolic" fashion i.e. by equivalent of df[-z] (which is illegal) ??? Or alternativeley, is there an equivalent of
2007 Jul 07
3
color scale in rgl plots
Hello, I'm trying to make a 3d plot using rgl in which the size and color of each point corresponds to certain attributes of each data point. The color attribute, let's call it X, is scaled to go from 0 to 1. The rainbow(64,start=0.7,end=0.1) palette is perfect for what I want but I don't know how to take that palette and pick a color from it based on the value of X for a given data
2009 Nov 30
1
multiple column argument in formula (MASS:lda)
Dear R Help team, I'm having some problems running a discriminant analysis (MASS:lda) over my data, i have a grouping variable coming from a previous cluster analysis and several discriminators (78 actually). I'm trying to run lda using column index as independent variable in the formula like it's done in the help page for ?formula:
2013 Sep 06
1
Java exception error (Jcheck) while running an R script
...pot which exactly is the problem and how i can solve it. The error I get is the following: ---- Error in .jcheck(silent = FALSE) : Java Exception <no description because toString() failed>.jcall(row[[ir]], "Lorg/apache/poi/ss/usermodel/Cell;", "createCell", as.integer(colIndex[ic] - 1))<S4 object of class "jobjRef"> ---- As I am not a programmer, i don't really understand the error message. I did a search to try to understand what is wrong and if i am correct the problem is related with the 'rjava' package. I am not using directly this packa...
2013 Jan 10
1
how to generate a matrix by an my data.frame
...tom and the attachment.Maybe some one could tell me an appropriate way to show it.I'm sorry for the inconvenience. Q:How to generate a 53*53 diagonal matrix by my data Some problems confused me are that: 1.Since it is a diagonal matrix,I have tried to transform col1 and col2 to rowindex and colindex ,but I don't know how to generate matrix by its value's index 2. As you see, the number of 2353 corresponding to other ids in col2 is 53,however,the number of 2409 corresponding to other ids in col2 is 52 and 2500 corresponding to 51 values and so on,so it is hard to use matrix() to genera...