similar to: R and file size

Displaying 20 results from an estimated 1000 matches similar to: "R and file size"

2005 Aug 25
1
Attempting to recode elements contained in a list
Hello R-Masters, I have a list 's' with three elements, as shown below. I want to recode a.a, a.a2, and a.a3 to NA if the value in a.a is less than 3. I reivewed my Modern Applied Statistic Book, the online help and did some searching of R-help on the internet. I explored unlist and as.list.data.frame in an attempt to isolate the third element of the list s, but this was not helpful.
2003 Oct 07
3
Problem getting an ifelse statment to work
This is a "long" way; i.e., not necessarily efficient: > qs2 [1] 2 1 1 4 4 4 1 1 1 4 2 4 3 1 4 3 3 2 4 3 > qs9 [1] 4 4 1 3 4 3 1 3 1 4 1 2 3 3 4 4 1 4 2 3 > decision <- function(a, b) { + if (a == 1 || b == 1) return(1) + if (a == 2 || b == 2) return(2) + if (a == 3 || b == 3) return(3) + if (a == 4 || b == 4) return(4) + NA + } > mapply(decision,
2003 Apr 17
2
make check failure with R-1.7.0
I'm baffled. When I run make check after installing from source, I get a Error 2. From my understanding of how these things work, it would appear to be coming from this (as at the end of base-Ex.Rout.fail: > has.VR <- require(MASS, quietly = TRUE) Attaching package 'MASS': The following object(s) are masked from package:base : confint confint.lm nclass.FD nclass.scott
2002 Jul 29
2
How do we omit the coastline using map?
I've been able to do most things I'd like to using the map package, but I can't figure out how to fill a region without drawing a black outline. I can draw the outline in a specified colour, but as soon as I set fill to TRUE, I get a black outline in addition. My map has a lot of activity on the coastline so I don't want a black line obscuring what I do there. A pale colour to
2003 May 05
1
Matrix manipulation
I have a square matrix wherein a '*' indicates an HSD between the levels indicated by row name and column name. The '.' is simply marking the diagonal. A blank indicates the same group A B C D E F G H I J K L M N A . B . C * * . D * * . E * * * . F * * * .
2005 Nov 06
1
kinship package example data
I've been looking at the kinship package which looks as though it might be appropriate for my purposes. What I can't find is any reference to the data that is used in the example code. A dataframe called d10 with column names, upn, dadid, momid, sex and affect is required. One can get an idea of what sort of values should be in most columns from the description in the pedigree function,
2005 Feb 17
3
help on deleting NAs
Dear R friends My goal is to eliminate this specific group(1) if the # of NAs in this group greater than 50%(specifically say greater than 3). Would you please show me how to do it. I have a sample data as following: Thanks a lot. Kevin Lin y group f1 f2 f3 30 NA 1 1 1 1 27 NA 1 1 2 2 48 NA 1 2 1 2 40 -0.6066416 1 2 2 1 24
2003 Apr 22
2
How do I get 10^4 to become 10000?
Of course, that's as trivial as it gets on the command line, but I can't work out how to get a column of numbers that are entered as "10^5" from its 'character' format into a numeric one? I feel a bit embarrassed asking such a simple question. Too much Easter.... Thanks -- Patrick Connolly HortResearch Mt Albert Auckland New Zealand Ph: +64-9 815 4200 x 7188
2004 Dec 21
4
Removing trailing spaces
Some years ago when I used S-PLUS, I seem to remember, there was a discussion about a simple method of removing trailing spaces from vector elements. I'd be fairly sure the same would work in R, but I can't find any mention of anything like it in the R archives or with help.search(). There are ways I could do it with substring(), but I seem to remember there was something more elegant.
2003 May 07
1
Tick labels on y axis in lattice plots
I seem to remember this was discussed a year or two ago, but I can't find it in the archives. platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 1 minor 7.0 year 2003 month 04 day 16 language R
2003 Sep 01
2
help for performing regressions based on combination of predictors
Dear All, I would like to perform linear regressions based on Y and all of the combinations of the five predictors, i.e.,(y,x1,x2),(y,x1,x3),....,(y,x1,x2,x4,x5),....,(y,x1,x2,x3,x4,x5). Is there any quick way to do it instead of repeat performing regressions for 31 times? Or, is there any method to manipulate the dataset into the 31 combinations? Thanks for your help!
2004 Mar 19
2
Why is rpart() so slow?
I've had rpart running on a problem now for a couple of *days*, but I'd expect a decision tree builder to run in minutes if not seconds. Why is rpart slow? Is there anything I can do to make it quicker?
2006 Jan 18
1
Canonical Variance Analysis by any other name?
I've been asked about "Canonical Variance Analysis" (CVA). I don't see any reference to it searching the R site. Does it go by other names? Genstat describes it thus: Canonical variates analysis operates on a within-group sums of squares and products matrix, calculated from a set of variates and factor that specifies the grouping of units. It finds linear combinations of the
2004 Feb 13
1
How to get time differences in consistent units?
I'm still having trouble getting to grips with time classes. I wish to calculate the difference in days between events. Browse[1]> insp.j$First [1] "2002-02-19 13:00:00 NZDT" Browse[1]> spray.j$Date [1] "2001-11-29 13:00:00 NZDT" Browse[1]> insp.jk - spray.j$Date Time difference of 82 days If I save insp.jk to a vector, I get a nice useful value of 82.
2002 Aug 12
1
Level sets of factors are different (panel.superpose)
I investigated why I was getting this error message... Error in Ops.factor(groups[subscripts], vals[1]) : Level sets of factors are different which led me to putting a browser in panel.superpose: Called from: panel.superpose(x, y, subscripts, ...) Browse[1]> vals vals [1] 1 2 3 Levels: 1 2 3 Browse[1]> groups[subscripts] groups[subscripts] [1] 1 2 3 1 2 1 2 3 1 2 3 1 2 3 Levels: 1 2
2004 Jan 14
2
Binomial glms with very small numbers
V&R describes binomial GLMs with mortality out of 20 budworms. Is it appropriate to use the same approach with mortality out of numbers as low as 3? I feel reticent to do so with data that is not very continuous. There are one continuous and one categorical independent variables. Would it be more appropriate to treat the response as an ordered factor with four levels? If so, what family
2003 Sep 23
1
Omitting blank lines with read.table
Say we have a tab delimited file called bug.txt Part Rep Cage Hb pupae 1 1 S 32 1 M 34 L 42 2 S 36 M 28 L 36 read.delim("bug.txt") Part Rep Cage Hb.pupae 1 1 1 S 32 2 NA 1 M 34 3 NA NA L 42 4 NA NA NA 5 NA NA NA 6 NA 2 S 36 7 NA NA M 28 8 NA NA L 36 >
2004 Jun 06
4
Request help writing a function
I have been wrestling with this function for quite a while, and am not making headway. 1) I want to apply a function to the following columns of a dataframe: myfunction. <- apply(ph5028[,c(83:107)],2,function(x) ... 2) Within each of the above columns there is a single numeric code, 1, 2 or 3 or an NA. 3) My goal is to determine the percent of time each person used a 2 code. So if a person
2003 Apr 22
4
Default value for title in postscript function
I like the fact that the postscript function enables the possbiility of a more useful title than before. However, I'd prefer the default to be the file name. It's very simple for me to make my own postscript function that does just that simply by setting title = file. I always use onefile = TRUE, so it always works (so far). However, I'm a little reluctant to do that in case some
2003 Apr 22
4
Default value for title in postscript function
I like the fact that the postscript function enables the possbiility of a more useful title than before. However, I'd prefer the default to be the file name. It's very simple for me to make my own postscript function that does just that simply by setting title = file. I always use onefile = TRUE, so it always works (so far). However, I'm a little reluctant to do that in case some