Displaying 20 results from an estimated 265 matches for "tbl".
Did you mean:
tbd
2005 Jul 07
1
Tables: Invitation to make a collective package
...<- end-start
h <- R/k
}
# User defines 'x' and 'k'
# (x, k,[breaks, right])
else {
tmp <- range(x)
start <- tmp[1] - abs(tmp[2])/100
end <- tmp[2] + abs(tmp[2])/100
R <- end-start
h <- R/abs(k)
}
tbl <- tb.make.table.I(x, start, end, h, right)
return(tbl)
}
#
# With Gabor Grotendieck suggestions (thanks Gabor, very much!)
#
tb.table <- function(x, ...) UseMethod("tb.table")
#
# Table form vectors
#
tb.table.default <- function(x,
k,...
2011 Jul 05
2
Stuck ...can't get sapply and xmlTreeParse working
...tuff 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 ?
library(XML)
url.montco <-
"http://webapp.montcopa.org/sherreal/salelist.asp?saledate=07/27/2011"
tbl <-data.frame(readHTMLTable(url.montco))[, c(3,5,6,8,9)]
tbl <-tbl[2: length(tbl[,1]),]
names(tbl) <- c("Address", "Township", "Parcel", "SaleDate", "Costs");
rownames(tbl) <- NULL
v <- gregexpr("( aka )|( AKA )",tbl$Address)...
2011 May 02
2
INSERT OR UPDATE
...s 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 = rep(LETTERS[1:2], 3),
somevalue = rnorm(6)
)
# Create table in database using the following SQL
CREATE TABLE tbl
(
key1 integer NOT NULL,
key2 character varying(1) NOT NULL,
somevalue double precision,
CONSTRAINT pktbl PRIMAR...
2003 Feb 28
0
(multiway) percentage tables
...John_Hendrickx at yahoo.com>
ctab<-function(...,digits=2,
type=c("n", "row", "column", "total"),
row.vars=NULL, col.vars=NULL,
percentages=TRUE) {
if (attributes(...)$class=="factor") {
# create a table if the arguments are factors
tbl<-table(...)
}
else if ("table" %in% class(...) || class(...)=="ftable") {
# the argument is a table object (table, xtabs, ftable)
tbl<-eval(...)
}
else {
stop("first argument must be either factors or a table object")
}
type<-match.arg(type)
# o...
2012 Dec 17
2
Why does matrix selection behave differently when using which?
...sum of matching row numbers is much greater than the number of
rows in "t".
The table "t" I use can be downloaded from here:
https://github.com/groupschoof/PhyloFun/archive/test_selector.zip
Unzip the file and read in the table "t" using t <- read.table("test.tbl")
The above function "sumRows" is defined as follows:
sumRows <- function( tbl, ps ) {
sum(
sapply(ps,
function(x) {
t <- if ( is.na(x) ) {
tbl[ which( is.na(tbl[ , "Domain.Architecture.Distance" ]) ), ,
drop=F]
} else {...
2012 Mar 13
1
Visualising multiple response contingency tables
...mean by
'multiple response' is that the total number of responses per row of a
contingency table will be greater than the total number of respondents. An
example of a multiple response table shown below (apologies if my
formatting is incorrect or silly, I'm a hardcore R newbie):
> f.tbl = structure(c(10, 15, 25, 45, 30, 50), .Dim = 2:3, .Dimnames = structure(list(+ Sex = c("F", "M"), Responses = c("A", "B", "total subjects"+ )), .Names = c("Sex", "Responses")), class = &q...
2019 Jun 03
2
[PATCH 22/22] docs: fix broken documentation links
Le 30/05/2019 ? 01:23, Mauro Carvalho Chehab a ?crit?:
> Mostly due to x86 and acpi conversion, several documentation
> links are still pointing to the old file. Fix them.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung at kernel.org>
> ---
> Documentation/acpi/dsd/leds.txt | 2 +-
> Documentation/admin-guide/kernel-parameters.rst | 6
2019 Jun 03
2
[PATCH 22/22] docs: fix broken documentation links
Le 30/05/2019 ? 01:23, Mauro Carvalho Chehab a ?crit?:
> Mostly due to x86 and acpi conversion, several documentation
> links are still pointing to the old file. Fix them.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung at kernel.org>
> ---
> Documentation/acpi/dsd/leds.txt | 2 +-
> Documentation/admin-guide/kernel-parameters.rst | 6
2011 May 26
2
What am I doing wrong with sapply ?
...he 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 <-
"http://webapp.montcopa.org/sherreal/salelist.asp?saledate=05/25/2011"
tbl <-data.frame(readHTMLTable(url))[2:404, c(3,5,6,8,9)]
names(tbl) <- c("Address", "Township", "Parcel", "SaleDate", "Costs");
rownames(tbl) <- c(1:length(tbl[,1]))
x <-tbl
v <- gregexpr("( aka )|( AKA )",x$Address)
s <-sap...
1998 May 16
3
TRANS.TBL files on Win95 fileserver
I have a small LAN in my basement, with my PC running RH5 Linux and a Win95 PC
connected by Samba. Everything works fine, but when I smbmount a CD (burned
with xcdroast) from the Linux box (CD is in the Win95 machine) I do not get the
proper filenames. All files are uppercase, and the TRANS.TBL files appear to be
ignored. I have tried playing with name mangling, but it didn't help. Is this a
Samba deficiency, or is it something I've configured wrong?
2019 Jun 04
0
[PATCH 22/22] docs: fix broken documentation links
...t
> > + For details, see Documentation/x86/protection-keys.rst
>
> It looks strange to reference an x86 file, for powerpc arch.
Indeed. Yet, seeking for the API documented there:
$ git grep -l pkey_mprotect
Documentation/x86/protection-keys.rst
arch/alpha/kernel/syscalls/syscall.tbl
arch/arm/tools/syscall.tbl
arch/arm64/include/asm/unistd32.h
arch/ia64/kernel/syscalls/syscall.tbl
arch/m68k/kernel/syscalls/syscall.tbl
arch/microblaze/kernel/syscalls/syscall.tbl
arch/mips/kernel/syscalls/syscall_n32.tbl
arch/mips/kernel/syscalls/syscall_n64.tbl
arch/mips/kernel/syscalls/syscall_...
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) <- c(&q...
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 <- read.csv("C:\\FRANCISCO\\PROYECTOS\\2016\\PROYECTOS\\CALCULADORA_PPC\\DATOS\\CALCULADORA\\CARTERA_PPC.csv", sep = ";") rv$cachedTbl <<- tbl return(tbl) } else{...
2017 Oct 18
1
Problem with tq_mutate_xy() from the tidyquant package
...uot;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 <- fullXts["2017-02-01::"]
rolling_corrOnePair <- function( aXts, col1, col2, window ) { #window =
window size in days
tbl <- timetk::tk_tbl( aXts[,c(col1,col2)], rename_index="date" )
colnames(tbl) <- c("date","x","y")
naV <- sapply(1:nrow(tbl), function(i) any(is.na(tbl[i,])) )
tbl <- tbl[!naV,]# remove any rows with NAs
tq_mutate_xy( data=tbl, x = x, y =...
2008 Jun 24
2
spineplot (graphics package): how to control font size?
I cannot modify the font size of the standard text items for the
splineplot function
found in the standard graphics package. Here is a tiny example, in
which
I try (but fail) to make the main title large.
tbl = read.table ('http://www.ggobi.org/book/data/tips.csv',
sep=',', header=T)
spineplot (table (tbl$DAY, tbl$SEX), main='TIPS', cex.main=3)
None of the other 'cex' parameters seem to work either, but cex.main
is probably
a sufficient example.
Any tips for me...
2003 Apr 15
5
Summarizing levels for future commands
Hi. This will hopefully be readily understood but if not, bear with me.
I have to do a repeated analysis (in spatstat) and want to batch file it. For each of my 'runs' certain variables change. At present I am manually specifying these changes and want to automate it if possible.
Ok, I am creating an object which is comprised of 'levels' that are 'characters'. Further
2007 Jul 10
0
Plot dies with memory not mapped (segfault) (PR#9785)
...systems[iter],"
",usageDateClamp,";",sep="")
if(CLAY_CLASS=="TRUE") {
failureQuery<-paste("SELECT
DISTINCT(STR_TO_DATE(CONCAT(YEAR(FROM_UNIXTIME(dispatch_time)),'-01-01'),'%Y-%m-%d'))
AS date, if(tbl.probs is NULL,0,tbl.probs) FROM ",systems[iter]," LEFT JOIN
(SELECT SUM(if(clay_class='Interconnect' OR clay_class='Disk' OR
clay_class='Memory' OR clay_class='Networking, Machine Access' OR
clay_class='Shared Storage',1,0)) AS probs,
STR_TO_DATE(CO...
2012 Nov 26
1
error in plot(table(c('a','a')))
...ables 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 <- table(c('a','a'))
tbl.char2 <- table(c('a','a','b'))
tbl.int1 <- table(c(1,1))
# error:
plot(tbl.char1)
# no errors:
plot(tbl.char2)
plot(tbl.int1)
sessionInfo()
R version 2.14.0 (2011-10-31)
Platform: i686-pc-linux-gnu (32-bit)
local...
2012 Nov 26
1
error in plot(table(c('a','a')))
...ables 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 <- table(c('a','a'))
tbl.char2 <- table(c('a','a','b'))
tbl.int1 <- table(c(1,1))
# error:
plot(tbl.char1)
# no errors:
plot(tbl.char2)
plot(tbl.int1)
sessionInfo()
R version 2.14.0 (2011-10-31)
Platform: i686-pc-linux-gnu (32-bit)
local...
2013 Mar 03
1
Ordering Table Columns
...ong
> direction?
> If this has been answered previously and I've just failed to find it in my
> searches, please accept my apologies.
>
> Many Thanks,
> Chris
Think you want to have a look at factors....
Typing ?factor will throw up the relevant help pages
# Your Data
tbl <- read.table(header = TRUE, text = "
ShirtSize Number
L 20
M 20
S 11
XL 7
XXL 2
")
# ShirtSize Alphabetical
tbl[tbl$ShirtSize,]
# Reorder Factor
tbl$ShirtSize = factor(tbl$ShirtSize, levels=c("S","M","L","XL",&quo...