similar to: Append the sum of each row and column to a table matrix

Displaying 20 results from an estimated 4000 matches similar to: "Append the sum of each row and column to a table matrix"

2008 Jan 28
1
help with checking out-of-range values in each column in data frame
Dear list, I have following data, where I want to check if any value in each column is out of range. For example, column "f1" can only take values 1-5, so if any values less than 1 or > 5 will be defined as missing value (i.e. NA), column "f4" can only take values of 1-3 and any values that are outside this interval will be considered as missing values. The below
2008 May 12
1
help with calculating the differences between dates
Dear list, How can I calculate the difference in days between the eventdate and basedate in the below dataset? id basedate outcome.3 eventdate daydiff 1 1001 1999-09-28 2 1999-10-01 3 2 1002 1999-09-22 1 3 1003 2000-01-19 1 4 1004 2004-01-25 2 2004-02-03 9 5 1005 2005-08-11 1 6 1006 2000-07-04
2007 Aug 02
4
problem with reading data files with different numbers of lines to skips
Dear List, I have 30 data files with different numbers of lines (31 and 33) that I want to skip before reading the files. If I use the skip option I can only choose either to skip 31 or 33 lines. The data files with 31 lines have no blank rows between the lines and the header row. How can I read the files without manually checking which files have 31 respectively 33 lines ? The only text
2008 Oct 23
0
error when using logistic.display within a loop
Dear list, I tried to apply the logistic regression to different response variables from a dataframe and would like to store the results using the function logistic.display from the "epicalc" package in a list, but got an error message "Error in eval(expr, envir, enclos) : y values must be 0 <= y <= 1". All the response variables have value of 0 or 1. It worked
2009 Mar 05
1
is there any option like cex.axis in ggplot2?
Dear list,   I made boxplots using ggplot and want to control for x- and yaxis. Using "plot" I can do it by setting cex.axis equally to any size but can't figure out how to do it with ggplot.     ggplot(dat, aes(x = factor(time), y = volume)) + opts(axis.title.x=theme_text(size=8),axis.title.y=theme_text(size=8)) + geom_boxplot() + geom_jitter(aes(colour = id))+labs(x =
2008 Feb 12
3
help with bwplot
Dear list, I have following data set, which I want to plot the "Scale" variable on the x-axis and "Mean"´on the y-axis for each Ageclass and for each sex. The Mean value of each Ageclass for each sex would be connected by a line. Totally, there should be 6 lines, from which three present the Mean values of each Ageclass for respective sex. Are there any easy ways to do
2008 Feb 07
1
Calculate the difference between dates
Dear list, I have two data columns (part of big data frame) containing dates presenting the dates when two measurements (M1 and M2) were taken. The data consists of 73 individuals divided in different groups. Each group was examined at different time points (see M1 date),but the measurements (M1 and M2) within each group should be taken in the same day but due to some practical issues,
2008 Apr 01
1
set the lower bound of normal distribution to 0 ?
Tom Cohen <tom.cohen78@yahoo.se> skrev: Thanks Prof Brian for your suggestion. I should know that for right-skewed data, one should generate the samples from a lognormal. My problem is that x and y are two instruments that were thought to be measured the same thing but somehow show a wide confidence interval of the difference between the two intruments.This may be true that these
2011 Oct 18
1
How to read data sequentially into R (line by line)?
I have a data set like this in one .txt file (cols separated by !): APE!KKU!684! APE!VAL!! APE!UASU!! APE!PLA!1! APE!E!10! APE!TPVA!17122009! APE!STAP!1! GG!KK!KK! APE!KKU!684! APE!VAL!! APE!UASU!! APE!PLA!1! APE!E!10! APE!TPVA!17122009! APE!STAP!1! GG!KK!KK! APE!KKU!684! APE!VAL!! APE!UASU!! APE!PLA!1! APE!E!10! APE!TPVA!17122009! APE!STAP!1! GG!KK!KK! it contains over 14 000 000 records. Now
2009 Oct 19
3
loop and plot
Dear all, I am stuck at applying loop function for creating separated plots. I have coding like below: dataset.table <- table(data.frame(var1=c(1,2,3,1,2,3,1),colour=c("a","b","c","c","a","b","b") )) kk = function(f) { ls=as.character(f) pie(dataset.table[ls,],main=ls)
2001 Feb 08
2
dnbinom(,size<1,)=0 (PR#842)
This came up on r-help but indicates a bug. dnbinom(x,n,p) calls dbinom_raw(n-1,...) which returns 0 for n<1. -thomas ---------- Forwarded message ---------- Date: Thu, 08 Feb 2001 17:10:23 +0000 From: Yudi Pawitan <yudi@stat.ucc.ie> To: Mark Myatt <mark@myatt.demon.co.uk> Cc: R-Help <r-help@stat.math.ethz.ch> Subject: Re: [R] Goodness of fit to Poisson / NegBinomial
2010 May 13
1
merge for data.frame and matrix
Hello, how to merge a data.frame and a matrix by one column in the data.frame and rownames of the matrix? df <- data.frame(col1=c("kk","yy","kk"),col2=c(6,4,3)) > df   col1 col2 1   kk    6 2   yy    4 3   kk    3 m<-matrix(c(3,8,56,9), nrow=2, dimnames = list(c("aa","kk"),c("col1","col2"))) > m    col1 col2 aa   
2006 Nov 03
1
difference in using with() and the "data" argument in glm call
Dear all, I am dealing with the following (apparently simple problem): For some reasons I am interested in passing variables from a dataframe to a specific environment, and in fitting a standard glm: dati<-data.frame(y=rnorm(10),x1=runif(10),x2=runif(10)) KK<-new.env() for(i in 1:ncol(dati)) assign(names(dati[i]),dati[[i]],envir=KK) #Now the following two lines work correctly:
2011 Oct 27
2
Consistant test for NAs in a factor when exclude = NULL?
Dear folks? Is there a function to correctly find (and count) the NAs in a factor when exclude=NULL, regardless of whether their origin is in the original data or by subsequent assignment? In example number 1 below, where NAs are assigned by is.na()<-, testing the factor with is.na() finds the correct number of NAs. In example number 2, where the NAs are from the data, neither is.na(), ==NA,
2006 Nov 03
1
[R] difference in using with() and the "data" argument in glm (PR#9338)
I've redirected this reply from r-help to the bugs list. On 11/3/2006 8:25 AM, vito muggeo wrote: > Dear all, > I am dealing with the following (apparently simple problem): > For some reasons I am interested in passing variables from a dataframe > to a specific environment, and in fitting a standard glm: > > dati<-data.frame(y=rnorm(10),x1=runif(10),x2=runif(10)) >
2005 Aug 26
1
Memory leakage/violation?
Hi, I've spotted a possible memory leakage/violation in the latest R v2.1.1 patched and R v2.2.0dev on Windows XP Pro SP2 Eng. I first caught it deep down in a nested svd algorithm when subtracting a double 'c' from a integer vector 'a' where both had finite values but when assigning 'a <- a - c' would report NaNs whereas (a-c) alone would not. Different runs
2009 May 14
2
[LLVMdev] alias analysis results
Hi there, I am trying to understand how AliasAnalysis works out in LLVM. I used the following simple test-case (test4.c): -- void test() { int *jj, *kk; int aa = 100; jj = &aa; *jj = 300; } int main() { test(); return 0; } -- Then I did "llvm-gcc -emit-llvm -c -o test4.bc test4.c" to get bc. I tried the following 2 ways to get what I expect to get as
2009 Dec 11
1
about --link-dest
Hello all: I don't know what I'm doing bad, but --link-dest does not work for me: I have three directories, the original one, the first copy and the second copy I want to populate: $ ls -li total 12 1761433 drwxr-xr-x 2 envite envite 4096 dic 10 14:04 copy1 1761434 drwxr-xr-x 2 envite envite 4096 dic 11 01:18 copy2 1761432 drwxr-xr-x 2 envite envite 4096 dic 10 14:04 origin $ ls -li *
2005 May 25
1
Samba vs ActiveDirectory Kerberos error message
Hi, When validating users on my Linux system against an ActiveDirectory, the Windows event log are filled with messages like these (Windows Event ID 675): Pre-authentication failed: User Name: linux$ User ID: KK\linux$ Service Name: krbtgt/KK.LOCAL Pre-Authentication Type: 0x0 Failure Code: 0x19 Client
2010 Aug 05
1
difficulties with read.table applied to files from URL
Hello, I am using read.table to read files directly from a public ftp site. I have a general list of files that may or may not exist in the ftp directory, but my hope was that R would read the file if it existed and ignored it if it didn't exist and move on to the next one. However, when R arrives at a file that does not exist I get the error message "Error in file(file, "rt") :