similar to: remove 0 rows from a data frame

Displaying 20 results from an estimated 400 matches similar to: "remove 0 rows from a data frame"

2003 Oct 20
4
warning from return() in 1.8 but not in 1.7.0 (PR#4687)
To whom it may concern, I get the following message when I run my function: Warning message: multi-argument returns are deprecated in: return(call.fn, repl, time, from, to, last.year, occup.m, ant.occ.m, > version platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 1 minor 8.0
2004 Sep 26
2
help for stata user
Hi, I'm new to R, and I'm STATA user before, could you help me where I can get document about comparison command between STATA and R. Thank you very much, Best regards, -iip-
2003 May 22
7
extract half a matrix
Dear all, I'm new to matrix operations in R. I couln't find a solution to the following problem among earlier help mails or in An introd to R, I guess because the question is really basic. I want to extract all above the diagonal, i.e. from 1 2 3 4 1 0 26 49 49 2 26 0 44 40 3 49 44 0 21 4 49 40 21 0 I want 26 49 44 49 40 21 Thanks in advance! Sincerely, Tord
2007 Mar 19
5
order of values in vector
Dear all, I would like to get the order of the values in a vector. I have tried rank(), order() and searched the archive, though without success. Here is an example of a try x= c(20,30,50,40,60,10) cbind(sort.list(x),x) x [1,] 6 20 [2,] 1 30 [3,] 2 50 [4,] 4 40 [5,] 3 60 [6,] 5 10 but I was hoping to get this: x [1,] 2 20 [2,] 3 30 [3,] 5 50 [4,] 4 40 [5,] 6 60 [6,] 1 10 I'm
2003 Dec 07
2
par(las = 1) not possible in polymap(), library(splancs)?
Dear all, I want my PhD thesis which I hand in tomorrow to look even nicer: Does polymap in the splancs library not allow horizontal plotting of y-labels? I have tried polymap(studyarea, xlab = "x (m)", ylab = "y (m)", las = 1) but it doesn't change the labels? Mayby some function in library(spatstat) support las? Thanks! Sincerely, Tord
2013 Jan 04
3
help "reshaping" dataframe
List, I want to reshape my data, but I'm not sure how to do it... it might be a simple task, but don't know which package does this. "occ.data" (see below) is how my original data are arranged, and I know that with melt() I can reshape it like "y" (see below). However, I just want to build a matrix like the "y" matrix, but with only 2 dimensions. Something
2012 Jul 17
2
Problem creation tensor
Hi guys, I need some help to analyzing my data. I start to describe my data: I have 21 matrices, every matrix on the rows has users and on columns has items, in my case films. Element of index (i, j) represent the rating expressed by user i about item j. I have a matrix for each of professions. An example of a this type of matrix is: item 1 item 2 item 3 item4 id
2003 Jan 22
3
Error when using polr() in MASS
Dear all, I get an error message when I use polr() in MASS. These are my data: skugg grupp frekv 4 1 gr3 0 5 2 gr3 3 6 3 gr3 6 10 1 gr5 1 11 2 gr5 12 12 3 gr5 1 > > summary(polr(skugg ~ grupp, weights=frekv, data= skugg.cpy1.dat)) Error in optim(start, fmin, gmin, method = "BFGS", hessian = Hess, ...) :
2003 Feb 05
1
simplify a data frame
Dear all, For the past three hours I have tried simplify a data frame. I would be really happy if someone could help solving this, I'm sure simple, problem. I want to "aggregate" the data frame: ObjektID BalteNummer Baltessegment S.13 S.13.1 S.13.1.2 S.13 S.13.1 S.13.1.3 S.13 S.13.2 S.13.2.1 S.13 S.13.2 S.13.2.2 S.13 S.13.2 S.13.2.3 S.13 S.13.3 S.13.3.6 S.13 S.13.3 S.13.3.7
2002 Jan 04
4
line up a matrix
Dear all, I try to rearrange my ref. database (now in Excel!! :( ) for importing it into a reference manager program (RIS format). My file basically look like this [3,4]-matrix: rbind(c("a", "b", "c", "d"), c("e", "f", "g", "h"), c("i", "j", "k", "l")) [,1] [,2] [,3]
2003 Jul 21
2
bold AND italic as font in text()
Dear all, Is it possible to somshow plot text as italic AND bold. I tried font=c(2,3) in text(), but it doesn't work. It seems like the latter value is used. Thanks in advance! Sincerely, Tord ----------------------------------------------------------------------- Tord Sn?ll Avd. f v?xtekologi, Evolutionsbiologiskt centrum, Uppsala universitet Dept. of Plant Ecology, Evolutionary Biology
2011 Mar 24
2
Questions for "domist... subscript out of bounds"
Hi all, I am a new user for R. I faced a questions about subscript out of bounds. Although I checked some other helps before I sent this email, I still don't know how to deal with this problems. I want to use "domain" function to run species distribution model in R. I used "sp.occ.do<-domain(env.pre, pred_train, factors=c('continent')) &
2006 Dec 27
3
counties in different colours using map()
Hi, I would like to plot a map of US counties using different colors. map() seems to be the function to use, e.g. library(maps); map('usa'); map('county', 'colorado', add=T,fill = T, col=c(1:5)) plots Colorado counties using colours 1 to 5. However, I want each color to represent a certain value - a value to be picked from a data frame. This code should show a
2003 Oct 08
2
binomial glm warnings revisited
Dear all, Last autumn there was some discussion on the list of the warning Warning message: fitted probabilities numerically 0 or 1 occurred in: (if (is.empty.model(mt)) glm.fit.null else glm.fit)(x = X, y = Y, when fitting binomial GLMs with many 0 and few 1. Parts of replies: "You should be able to tell which coefficients are infinite -- the coefficients and their standard errors will
2012 May 03
1
Help with getting values from string
Hi All, I have a doubt. I used macros and i try to pass a value to a macro by concatenating a bunch of strings. But it does not seem to work. Please help. I have written down my code and the error message please tell me how to pass the value that a string points to. Thanks in advance #macro defined
2005 Sep 19
4
factor as seq() in for loop
Dear all, I would like to use the values in vegaggr.BLMCMR02$colony str(vegaggr.BLMCMR02) `data.frame': 1678 obs. of 3 variables: $ vegtype : Factor w/ 27 levels "2010","2020",..: 3 4 5 19 4 5 19 5 $ colony : Factor w/ 406 levels "0","1","10","100",..: 1 1 1 1 2 2 2 $ Totvegproparea: num 0.00055 0.03956 0.95705
2004 Apr 28
1
simple repeated measures model: dumb user baffled!
I am in the process of transferring from an old version of S+ to using R having used a variety of other packages in the past. I'm hugely impressed with R but it has an excellent but depressing habit of exposing that I'm not a professional statistician and has done so again. Someone has run a nice little repeated measures design on my advice, students randomised to four orders of a
2003 Jul 31
2
how as.numeric() !-> factor
Dear all, I have divided two vectors: Np.occup97.98<- as.data.frame(cbind(site = levels(sums$site), Np.occup97.98 = sums$Ant.Nptrad97.98/Ant.trad$Ant.trad97.98)) > Np.occup97.98 site Np.occup97.98 1 erken97 0.342592592592593 2 erken98 0.333333333333333 3 rormyran 0.48471615720524 4 valkror 0.286026200873362 However, at a later stage of the analysis I want >
2011 Apr 08
5
duplicates() function
I need a function which is similar to duplicated(), but instead of returning TRUE/FALSE, returns indices of which element was duplicated. That is, > x <- c(9,7,9,3,7) > duplicated(x) [1] FALSE FALSE TRUE FALSE TRUE > duplicates(x) [1] NA NA 1 NA 2 (so that I know that element 3 is a duplicate of element 1, and element 5 is a duplicate of element 2, whereas the others were
2007 Aug 01
1
Problem to remove loops in a routine
Dear R-users, I have written the following code to generate some trellis plots. It works perfectly fine except that it is quite slow when it is apply to my typical datasets (over several thousands of lines). I believe the problem comes from the loops I am using to subset my data.frame. I read in the archives that the tapply function is often more efficient than a loop in R. Unfortunately ,