Displaying 20 results from an estimated 3000 matches similar to: "Rows to Column"
2012 Oct 22
6
How to use tapply with more than one variables grouped
I'm studying alone the R language for data preparation. I found a course at
MIT for data preparation that uses python but I'm using R to learning. The
first exercise is the preparation of data from a database that shows the
contributions made to candidates for U.S. president. The database is
described in FORMART
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
2006 Aug 08
2
Getting data out of a loop
A stupid question but I just cannot see how to do
this.
I have a loop that does some calculations and puts the
results in a vector for each iteration, but I cannot
see how to get the data out of the loop in such a way
that I can use it. I can print it but how do I get it
into a set of vectors or what ever.
Any help gratefully received. Thanks
Example
cata <- c( 3,5,6,8,0, NA)
catb <-
2007 Mar 09
1
Applying some equations over all unique combinations of 4 variables
#I have a data set that looks like this. A bit more
complicated actually with
# three factor levels but these calculations need to
be done on one factor at a
#I then have a set of different rates that are applied
#to it.
#dataset
cata <- c( 1,1,6,1,1,2)
catb <- c( 1,2,3,4,5,6)
doga <- c(3,5,3,6,4, 0)
data1 <- data.frame(cata, catb, doga)
rm(cata,catb,doga)
data1
# start rates
#
2007 Jun 28
3
Function call within a function.
I am trying to call a funtion within another function
and I clearly am misunderstanding what I should do.
Below is a simple example.
I know lstfun works on its own but I cannot seem to
figure out how to get it to work within ukn. Basically
I need to create the variable "nts". I have probably
missed something simple in the Intro or FAQ.
Any help would be much appreciated.
EXAMPLE
2006 Jul 01
1
Uh oh, Error solving...
undefined method `stringify_keys'' for [["Craved"], ["Whole Sale"]]:Array
I did this earler in the script how come now it''s yealling?
<% catas = Category.find(:all, :order=> "name").map {|u| [u.name]} -%>
<p><label for="item_cata">Catagory:</label><br/>
<%= select ''item'',
2007 Feb 02
1
Assigning labels to a list created with apply
I have a simple data base and I want to produce tables
for each variable. I wrote a simple function
fn1 <- function(x) {table(x)} where x is a matrix or
data.frame. and used apply to produce a list of
tables. Example below.
How do I apply the colnames from the matrix or names
from the data.frame to label the tables in the results
in the list. I know that I can do this individually
but
2006 Aug 28
2
Cannot get simple data.frame binding.
I am stuck on a simple problem where an example works
fine but the real one does not.
I have a data.frame where I wish to sum up some values
across the rows and create a new data.frame with some
of old data.frame variables and the new summed
variable.
It works fine in my simple example but I am doing
something wrong in the real world. In the real world
I am loading a labeled data.frame. The
2011 May 29
22
[Bug 8177] New: Problems with big sparsed files
https://bugzilla.samba.org/show_bug.cgi?id=8177
Summary: Problems with big sparsed files
Product: rsync
Version: 3.0.8
Platform: x64
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P5
Component: core
AssignedTo: wayned at samba.org
ReportedBy: joluinfante at gmail.com
2007 Feb 07
6
setting a number of values to NA over a data.frame.
This is probably a simple problem but I don't see a
solution.
I have a data.frame with a number of columns where I
would like 0 <- NA
thus I have df1[,144:157] <- NA if df1[, 144: 157] ==0
and df1[, 190:198] <- NA if df1[, 190:198] ==0
but I cannot figure out a way do this.
cata <- c( 1,1,6,1,1,NA)
catb <- c( 1,2,3,4,5,6)
doga <- c(3,5,3,6,4, 0)
dogb <- c(2,4,6,8,10,
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 ?
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
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 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 =
2013 Jan 07
2
how to aggregate T-test result in an elegant way?
Dear all:
Plan 1:
I want to do serval t-test means for different variables in a loop ,
so I want to add all results to an object then dump() them to an
text. But I don't know how to append T-test result to the object?
I have already plot the barplot and I want to know an elegant way to
report raw result.
Can anybody give me some pieces of advice?
Yao He
?????????????????????????
Master
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 <-
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
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