similar to: printing a dataframe by categories

Displaying 20 results from an estimated 20000 matches similar to: "printing a dataframe by categories"

2010 Dec 07
3
understanding output of tapply/by cumsum
Dear R-users, I have a dataset with categories and numbers. I would like to compute and add cumulative numbers to the dataset. I do not understand the structure of by(...) or tapply(...) output enough to handle it. Here a small example -------------- d<-expand.grid(a=1:5,b=1:3,c=1:2) d$n = 10 * d$a + d$b +0.1* d$c Sn<-by(d$n,list(d$a,d$c),cumsum) str(Sn) --------- List of 10 $ : num
2008 May 08
1
Reading multiple tables from file
Dear R-users, I have output files having a variable number of tables in the following format: ------------- 1 Pietje I1 I2 Value 1 1 0.11 1 2 0.12 2 1 0.21 2 Jantje I1 I2 I3 Value 1 1 1 0.111 3 3 3 0.333 ... ------------- Would there be an easy way of turning this into (a list of) data.frames with names Pietje, Jantje and variables I1,I2,...Value? (I1,I2 are string or categorical,
2007 Aug 01
2
Simple table with frequency variable
Hallo, Im trying to find out how to tabulate frequencies of factors when the data have a frequency variable. e,g: i<-rep(1:5,2) j<-rep(1:2,5) N<-10*i+j table(i,j) gives a table of ones as each combination occurs only once. How does one get a table with the corresponding N's? Thanks! Gerrit. -- Gerrit Draisma Department of Public Health Erasmus MC, University Medical Center
2009 Jun 06
1
correct line types in lattice legends
Hallo R-users, I do not understand how to specify the correct line and symbol types in the legends of a lattice xyplot. This is what I tried, but the line types and symbol in the graph are not seen in the legend. Any help is appreciated. Thanks, Gerrit. library(lattice) s<-rep(1:3,len=10) x<- 1:10 y<- x+s+rnorm(10) d<-data.frame(s,x,y) xyplot(y~x, groups=s,data=d,
2008 Jul 30
1
Unexpected line type in lattice plot key on pdf device
L.S., With the code below, on the Windows screen the line types in the key show as solid and dashed as in the graph, and in the pdf file they show as solid in the key and solid and dashed in the graph. I would not expect that, but may be I get something wrong. Gerrit. ------- library(lattice) # pdf("pietje.pdf") x<-0:10 xyplot((x^0.5)+(x^0.75)~x,type="o",lty=c(1,2),
2011 Nov 14
2
how to include integrate in a function that can be solved with uniroot?
Hallo, I am trying to define expectation as an integral and use uniroot to find the distribution parameter for a given expectation. However I fail to understand how to define properly the functions involved and pass the parameters correctly. Can anyone help me out? Thanks, Gerrit Draisma. This what I tried: ======= > # exponential density > g <- function(x,lambda){ lambda
2024 Sep 05
1
lattice log scale labels.
Do the "at" and "labels" components of the "scales" list argument to xyplot not do what you want? Cheers, Bert On Thu, Sep 5, 2024 at 4:05?AM Gerrit Draisma <gdraisma at xs4all.nl> wrote: > Dear R-helpers, > > In the plot below I would like to have labels at positions 2^(3*(0:10)), > and keep the labels in the exponential format. > I tried
2008 Apr 18
1
Vertical bars with barchart
Hallo, What is the right way to get vertical bars in a barchart? For instance barchart(VADeaths, key=simpleKey(colnames(VADeaths),points=F,rectangles=T)) gives what I need, only I would like the bars to be vertical. But barchart(VADeaths,horizontal=F, key=simpleKey(colnames(VADeaths),points=F,rectangles=T)) does not give what I need, and I do not understand how to change the
2009 Dec 04
1
latex.table for table with character and numeric columns
Hallo, I have a dataset with one or two columns with character data and the rest with numeric data. Using latex.table from the quantreg package produced a table, but I cannot set the decimals. For instance: --- > x<-data.frame(Name=c("Jan","Piet","Jan"), V=c(1,2.991,3)) > latex.table(as.matrix(x),file="x",caption="x") >
2024 Sep 05
1
lattice log scale labels.
Dear R-helpers, In the plot below I would like to have labels at positions 2^(3*(0:10)), and keep the labels in the exponential format. I tried using yscale.components.default. *This* gives the right format of the labels: -------- > yscale.components.default(lim= c(0,30),log=2) .... $num.limit [1] 0 30 ... [1] 0 5 10 15 20 25 30 ... $left$labels$labels [1] "2^0" "2^5"
2018 Apr 18
0
Problem with regression line
Hi, Anne, assign Age and Bloodpressure in the correct order to the axes in your call to plot as in: plot(y = Age, x = BloodPressure) abline(SimpleLinearReg1) Hth -- Gerrit --------------------------------------------------------------------- Dr. Gerrit Eichner Mathematical Institute, Room 212 gerrit.eichner at math.uni-giessen.de Justus-Liebig-University Giessen Tel:
2013 Jul 09
1
Puppet code review - suggestions and options
We are looking to implement a code review system that will require a review of the code before it gets to production servers. I have been looking into many different options, and would love some feedback and experiences from other users. Our puppet is in a git repo. We have 3 primary environments with a branch of puppet for each of them. All of our puppet info is in the git repo
2018 Jan 17
0
effects & lme4: error since original data frame notfoundWASeffects: error when original data frame is missing
Dear Gerrit, This issue is discussed in a vignette in the car package (both for functions in the car and effects packages): vignette("embedding", package="car") . The solution suggested there is the essentially the one that you used. I hope this helps, John ----------------------------- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada Web:
2018 Jan 17
0
effects & lme4: error since original data frame not found WASeffects: error when original data frame is missing
Hi, again, I have to modify my query since my first (too simple) example doesn't reflect my actual problem. Second try: When asking Effect() inside a function to compute an effect of an lmer-fit which uses a data frame local to the body of the function, as in the following example (simplifying my actual application), I get the "Error in is.data.frame(data) : object 'X' not
2018 Mar 28
1
Re: Change in ovirt-imageio[master]: Document the random I/O APIs
Hi Richard, We've added zero and flush functionality to imageio-daemon. You can download and test the latest build (for el7/fc) from: - http://jenkins.ovirt.org/job/ovirt-imageio_master_build-artifacts-el7-x86_64/200/artifact/exported-artifacts/ - http://jenkins.ovirt.org/job/ovirt-imageio_master_build-artifacts-fc27-x86_64/53/artifact/exported-artifacts/ -
2001 May 31
1
substitute values in a vector,dataframe
Hi! I've got a dataframe with -Inf values inside and i want to substitute them with 0. The dataframe is only one column. How can I do this in R? Thanks -- Frank Gerrit Zoellner -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or
2018 Jan 09
1
barplot_add=TRUE
Dear Gerrit Thanks a lot. "rbind" seems to be the right function. Unfortunately there is a shift in the x-axis (see pdf). There are 52 trapcatch values each, m and w, but m$trapcatch and w$trapcatch are shifted up to x-value 60. The follow-up lines for temp and humidity are fine. Thanks Sibylle setwd("~/Desktop/DatenLogger2017") # am Mac sks trap =
2018 Jan 17
4
effects: error when original data frame is missing
Hello, everyody, when asking, e.g., Effect() to compute the effects of a fitted, e.g., linear model after having deleted the data frame from the workspace for which the model was obtained an error is reported: > myair <- airquality > fm <- lm(Ozone ~ Temp, data = myair) > rm(myair) > Effect("Temp", fm) Error in eval(model$call$data, envir) : object 'myair'
2005 Mar 22
2
lattice xyplot() postscript (?) problem in R 2.0.0
Dear all, I work with R Version 2.0.0 on Machine hardware: sun4u OS version: 5.9 Processor type: sparc Hardware: SUNW,Sun-Blade-1000 and I have a very simple data frame (called OR) with the following variables: > sapply( OR, class) X ci FTyp "factor" "numeric" "factor" (In OR$ci there are some Inf-values. OR's
2017 Sep 29
3
Gerrit usage?
I'm trying to figure out how to commit some code for review. Following: https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage Created a ssh alias. Cloned using: "git clone ssh://asterisk/asterisk" Set name and email. Installed the gerrit commit hook: "git review -s" Try to change to asterisk 13 for creating a patch: "git checkout 13" This fails with: error: