Displaying 20 results from an estimated 10000 matches similar to: "Indexing multi-dimensional table"
2012 Jan 16
4
Add grid lines to levelplot
I'm using the levelplot function in the lattice package. I am plotting a
grid of cells and I want grid lines drawn between cells. I've spent a lot of
time trying different options. I've also looked at panel.levelplot. The
border parameter seems to be ignored or it doesn't mean cell border color.
The panel.levelplot calls grid.rect but forces lwd=1e-5 instead the passed
lwd. On
2009 May 10
2
Unintended loading of package:datasets
The dataset package is being loaded apparently by one of the packages that I
am using. The loading of the datasets takes a long time and I would like to
eliminate it. I thought the datasets were effectively examples so don't
understand why they would be required at all.
1) How can I determine what is causing the datasets to be loaded?
2) How can I stop them from doing so?
I am using the
2005 Jul 07
1
Tables: Invitation to make a collective package
Hi All,
I would like to make an invitation to make a collective package with all
functions related to TABLES.
I know that there are many packages with these functions, the original idea is
collect all this functions and to make a single package, because is arduous for
the user know all this functions broadcast in many packages.
So, I think that the original packages can continue with its
2011 Jul 05
2
Stuck ...can't get sapply and xmlTreeParse working
Can't seem to get the code below working. It gets stuck on line 24 inside the
function hm; comments show the line in question. The function hm is called
by sapply and is at the bottom of the code. Other stuff above line 24 works
correctly including the first couple of lines of the function hm. Should I
be using a different apply function or am I doing something wrong with
xmlTreeParse ?
2011 May 02
2
INSERT OR UPDATE
I'm trying to insert rows of a data.frame into a database table, or update where the key fields of a record already exist in the table. I've come up with a possible solution below, but would like to hear if anyone has a better solution.
# The problem demonstrated:
# Create a data.frame with test values
library(RODBC)
tbl <- data.frame(
key1 = rep(1:3, each = 2),
key2 =
2002 Oct 09
1
Help with
Hello All:
I hope I can get someone interested in this problem:
Agresti in "Analysis of Categorical Data," p. 289, applies a "row and column
effects model" to analyze a two-dimensional cross-classification of ordinal
data.
He got his results in either SAS or GLIM. Is there a way to replicate his
results with R?
He claims the RC model fits well with G^2(RC) = 3.57 with df =
2012 Dec 17
2
Why does matrix selection behave differently when using which?
Dear R community,
I have a medium sized matrix stored in variable "t" and a simple function "
countRows" (see below) to count the number of rows in which a selected
column "C" matches a given value. If I count all rows matching all pairwise
distinct values in the column "C" and sum these counts up, I get the number
or rows of "t". If I delete the
2011 May 15
1
Need help with text processing / string split
I used screen scraping to extract some information and put it into a table
called tbl. Now I want to modify the table a bit so the data can be more
useful. Here's the code I used:
library(XML)
rm(list=ls())
url <-
"http://webapp.montcopa.org/sherreal/salelist.asp?saledate=05/25/2011"
tbl <-data.frame(readHTMLTable(url))[2:405, c(3,5,6,8,9)]
names(tbl) <-
2016 Jun 21
2
Pregunta sobre shinyTable
Hola una pregunta:
¿Alguien ha trabajado con shinyTable?
Mi pregunta es si se puede controlar el tamano de una tabla que se muestra por pantalla
El tema es el siguiente:
Con esta parte de codigo:
output$tbl <- renderHtable({ if (is.null(input$tbl)){ #fill table with 0 tbl <-
2012 Mar 13
1
Visualising multiple response contingency tables
Dear R Help Community,
I have a question and an answer (based on reading this forum and online
research), but I though I should share both since probably there's a much
better way to go about my solution. My question is specifically about how
to best visualise multiple response contingency tables. What I mean by
'multiple response' is that the total number of responses per row of a
2017 Oct 18
1
Problem with tq_mutate_xy() from the tidyquant package
I was able to reproduce the problem with this self-contained example. Maybe
it could be reproduced with an even smaller one ...
library(tidyquant) # Loads tidyverse, tidyquant, financial pkgs, xts/zoo
library(xts)
dtV <- as.Date("2017-01-01") + 1:100
locL <- list( foo=xts(rnorm(100), order.by=dtV), bar=xts(rnorm(100),
order.by=dtV) )
fullXts <- do.call(merge,locL)
smallXts
2011 May 26
2
What am I doing wrong with sapply ?
Statement 9 using sapply does not seem to give the correct answer (or at
least to me). Yet I do what I think is the same thing with statement 11 and
I get the answer I'm looking for.
9 : s <-sapply(unlist(v[c(1:length(v))]), max)
11: for(i in 1 :length(v)) v1[i] <- max(unlist(v[i]))
Shouldn't I get the same answer ?
library(XML)
rm(list=ls())
url <-
2012 Nov 26
1
error in plot(table(c('a','a')))
Hi all,
there appears to be something strange with the plotting of tables of 1
dimension; if I attempt to make a plot of a table of characters with only
1 value I get an error (Error in xy.coords(x, y, xlabel, ylabel, log) :
'x' and 'y' lengths differ). With more than one value I don't get
errors, neither with integers (even if only 1 value):
tbl.char1 <-
2012 Nov 26
1
error in plot(table(c('a','a')))
Hi all,
there appears to be something strange with the plotting of tables of 1
dimension; if I attempt to make a plot of a table of characters with only
1 value I get an error (Error in xy.coords(x, y, xlabel, ylabel, log) :
'x' and 'y' lengths differ). With more than one value I don't get
errors, neither with integers (even if only 1 value):
tbl.char1 <-
2013 Mar 03
1
Ordering Table Columns
cdouglass wrote
> Hello all,
>
> Totally new to this and I'm just doing a frequency distribution analysis
> on T-shirt sales by size. I have a .csv with 60 orders. I read in the
> data using read.csv. If I look at the summary() or table() of the data it
> looks fine, except that the shirt sizes are alphabetical rather than from
> S-XXL--so the bar graph loses the shape
2018 Aug 14
1
R CMD check warnings on Windows
Hi all,
For the R package bujar, the warnings below were generated on CRAN's Windows systems. The package uses some Fortran subroutines. I would appreciate any advice to eliminate the warnings. By the way, similar warnings were generated to some unrelated R packages as well: https://www.r-project.org/nosvn/R.check/r-oldrel-windows-ix86+x86_64/imputeTS-00check.html.
Thanks in advance.
Zhu
2011 Jul 22
9
Random error in the recovery catalog
Hello,
I randomly errors like this:
Fri Jul 22 09:01:41 +0000 2011 //SERVER.fqdn/Puppet (err): Could not
retrieve catalog from remote server: end of file reached
Fri Jul 22 09:01:41 +0000 2011 //SERVER.fqdn/Puppet (notice): Using
cached catalog
Fri Jul 22 09:01:41 +0000 2011 //SERVER.fqdn/Puppet (err): Could not
retrieve catalog; skipping run
Here are the versions:
puppetmaster
2011 May 04
1
tryCatch?
I would like to do inserts into a database table, but do updates in the fairly rare cases in which the inserts fail. I thought tryCatch might be the way to do it, but I honestly do not understand the help file for tryCatch at all.
I thought something like this might work:
for (i in seq(along = tbl$key)) {
tryCatch(sqlSave(pg, tbl[i, ], "tbl", append = TRUE, rownames = FALSE),
2003 Dec 04
1
assigning colors to barplot when beside=TRUE
dear list,
i am having trouble coloring the bars in a barplot. my data have two
groups, which i would like to plot side by side. within each group i
want to sort the observations in decreasing order, like a pareto
chart. the bar colors would relfect the value of a third variable.
below i have generated a reproducible example. the bar heights are a
given pig's "gain",
2002 Mar 28
1
extracting non-NA columns from a data frame
I'm clustering using kmeans, and it doesn't accept NA. if NA occurs in a
column of the data frame, it occurs in every column, including column 1.
they say that a (good) programmer can write FORTRAN in any language, so I
came up with this, where tbl is the data frame containing NA -
> newtbl<-NULL
> for (i in 1:length(tbl)){if (!is.na(tbl[1,i])){
+ newtbl<-if