similar to: xtabs(), factors and NAs

Displaying 20 results from an estimated 6000 matches similar to: "xtabs(), factors and NAs"

2017 Jan 20
0
xtabs(), factors and NAs
>>>>> Milan Bouchet-Valat <nalimilan at club.fr> >>>>> on Thu, 19 Jan 2017 13:58:31 +0100 writes: > Hi all, > I know this issue has been discussed a few times in the past already, > but Martin Maechler suggested in a bug report [1] that I raise it here. > > Basically, there is no (easy) way of printing NAs for all variables > when calling
2015 Feb 09
3
xtabs and NA
Hi I haven't found a way to produce a tabulation from factor data with NA values using xtabs. Please find a minimal example below, it's also on R-pubs [1]. Tested with R 3.1.2 and R-devel r67720. It doesn't seem to be documented explicitly that it's not supported. From reading the code [2] it looks like the relevant call to table() doesn't set the "useNA"
2013 Feb 21
4
Getting htmlParse to work with Hebrew? (on windows)
Hello dear R-help mailing list. Looks like the same issue in Russian: library(RCurl) library(XML) u = " http://www.cian.ru/cat.php?deal_type=2&obl_id=1&room1=1" a = getURL(u) a # Here - the Russian is fine. a2 <- htmlParse(a) a2 # Here it is a mess... None of these seem to fix it: htmlParse(a, encoding = "windows-1251") htmlParse(a, encoding =
2015 Jun 16
4
Bugzilla activity?
Hi! I was wondering whether anybody was looking at the bugs on Bugzilla. I'm asking because I've seen bugs tackled on the mailing list quite quickly, but two fully reproducible reports I've filed on Bugzilla haven't triggered any reaction in several weeks (for the older one). FWIW, these are: - Line goes beyond plot region
2013 May 21
1
Lattice, ggplot, and pointsize
Hi! When inserting R plots into a document using odfWeave, I fought for a while to get Lattice plots use the same text size as base plots. I eventually discovered that specifying a point size via e.g. svg(pointsize=10) has no effect on Lattice plots. One needs to adjust the size manually via: trellis.par.set(fontsize=list(text=10, points=8)) This is also developed for both Lattice and ggplot2 by
2012 Sep 10
1
E-mail # 2 / attachments matrix test cases
HI Sridhar, Try this: #I saved the file as .csv. ?testMaster<-read.csv("test1Master.csv") ?test2Sorted<-read.csv("test2Sorted.csv") testMaster1<-testMaster[order(testMaster[,1]),] test2Sorted1<-test2Sorted[order(test2Sorted[,1]),] Combinedat<-as.matrix(merge(testMaster1,test2Sorted1,by="X")) ?rownames(Combinedat)<-Combinedat[,1]
2012 Jan 13
3
tm package, custom reader
I need help with creating custom xml reader for use with the tm package. The objective is to crate a corpus for analysis. Files that I'm working with come from solr and are in a funky XML format never the less I'm able to parse the XML files using solrDocs.R function provided by Duncan Temple Lang. The problem I'm having that once I parse the document I need to create a custom
2013 Apr 11
3
odfWeave: Some questions about potential formatting options
Hello All, Learning to use the odfWeave package. I really like the package. It has good documentation, makes some very nice looking tables, and seems to have lots of options for customizing output. There are a few things I'd like to do that don't seem to be covered in the documentation though. So I'm not sure if they're possible or not. Here's a list of some things I'd
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 <-
2009 Jun 03
1
Still can't find missing data - How do I get NA in xtabs with factors?
The problem here is Table doesn't seem to have a way to weigh the data. > ToyData Data1 Data2 Data3 Weight 101 Sam Red Banana 1.1 102 Sam Green Banana 2.1 103 Sam Blue Orange 2.1 104 Fred Red Orange 2.1 105 Fred Green Guava 2.1 106 Fred Blue Guava 2.1 107 <NA> Red Pear 50.1 108 <NA> Green Pear 50.1 109 <NA> Blue
2013 Sep 30
4
read.table() with quoted integers
Hi! It seems that read.table() in R 3.0.1 (Linux 64-bit) does not consider quoted integers as an acceptable value for columns for which colClasses="integer". But when colClasses is omitted, these columns are read as integer anyway. For example, let's consider a file named file.dat, containing: "1" "2" > read.table("file.dat",
2013 Apr 20
1
Assigning factor to character vector
Hi! Yesterday I accidentally discovered this: > a <- LETTERS[1:5] > a [1] "A" "B" "C" "D" "E" > > a[1] <- factor(a[1]) > a [1] "1" "B" "C" "D" "E" BUT: > b <- factor(LETTERS[1:5]) > b [1] A B C D E Levels: A B C D E > b[1] <- factor(b[1]) > b [1] A B C D E
2014 Dec 15
3
Making iconv portable?
Hello, All: What would it take to make ?iconv? portable? I ask, because I want to convert accented characters to vanilla ASCII, thereby converting, e.g., ?Ra?l? to ?Raul?, and Milan Bouchet-Valet suggested on R-help that I use 'iconv(x, ?", "ASCII//TRANSLIT?)?. This worked under Windows but failed on Linux and Mac. It?s part of the ?subNonStandardCharacters? function
2011 Dec 20
2
Extract BIC for coxph
Dear all, is there a function similar to extractAIC based on which I can extract the BIC (Bayesian Information Criterion) of a coxph model? I found some functions that provide BIC in other packages, but none of them seems to work with coxph. Thanks, Michael [[alternative HTML version deleted]]
2016 Aug 17
1
table(exclude = NULL) always includes NA
The quirk as in table(1:3, exclude = 1, useNA = "ifany") is actually somewhat documented, and still in R devel r71104. In R help on 'table', in "Details" section: It is best to supply factors rather than rely on coercion. In particular, ?exclude? will be used in coercion to a factor, and so values (not levels) which appear in ?exclude? before coercion will be mapped to
2016 Aug 15
1
table(exclude = NULL) always includes NA
>>>>> Martin Maechler <maechler at stat.math.ethz.ch> >>>>> on Mon, 15 Aug 2016 11:07:43 +0200 writes: >>>>> Suharto Anggono Suharto Anggono <suharto_anggono at yahoo.com> >>>>> on Sun, 14 Aug 2016 03:42:08 +0000 writes: >> useNA <- if (missing(useNA) && !missing(exclude) && !(NA %in%
2012 Oct 25
2
Regarding the memory allocation problem
Dear All, My main objective was to compute the distance of 100000 vectors from a set having 900 other vectors. I've a file named "seq_vec" containing 100000 records and 256 columns. While computing, the memory was not sufficient and resulted in error "cannot allocate vector of size 152.1Mb" So I've approached the problem in the following: Rather than reading the data
2011 Nov 16
1
"Non-finite finite-difference value" error in eha's aftreg
Hi list! I'm getting an error message when trying to fit an accelerated failure time parametric model using the aftreg() function from package eha: > Error in optim(beta, Fmin, method = "BFGS", control = list(trace = > as.integer(printlevel)), : > non-finite finite-difference value [2] This only happens when adding four specific covariates at the same time in the
2014 Dec 15
2
Making iconv portable?
> On Dec 15, 2014, at 12:21 PM, Kurt Hornik <Kurt.Hornik at wu.ac.at> wrote: > >>>>>> Spencer Graves writes: > >> Hello, All: >> What would it take to make ?iconv? portable? > > >> I ask, because I want to convert accented characters to >> vanilla ASCII, thereby converting, e.g., ?Ra?l? to ?Raul?, and >> Milan
2013 May 26
1
load ff object in a different computer
Hi all, I am having trouble loading a ff object previously saved in a different computer. I have both files .ffData and .RData, and the first of them is 13Mb large from which I know the data is therein. But when I try to ffload it, checkdir error: cannot create /home/_myUser_ Permission denied unable to process home/_myUser_/Rtempdir/ff1a831d500b8d.ff. and