Displaying 20 results from an estimated 10000 matches similar to: "dataframe of unequal rows"
2005 May 10
5
converting an ASCII file to a matrix
Dear R-WinEdit users,
I got a simple question, but somehow I cannot find the answer, although
I have
tried a lot!
I got an ASCII-file and I want to import it into R, so that every
character is defined by [i;j].
The rows are not of the same length.
the file looks like the following shortened abstract example:
name: xxxxx xxxx
age: 9.9.99
record number: 999
title: xxxxx xxxx xxx
keywords: xxx xx
2006 Jul 14
2
Recreate new dataframe based on condition
Hi,
How can I achieve this in R. Dataset is as follows:
>df
x
1 2
2 4
3 1
4 3
5 3
6 2
structure(list(x = c(2, 4, 1, 3, 3, 2)), .Names = "x", row.names = c("1",
"2", "3", "4", "5", "6"), class = "data.frame")
I want to recreate a new data frame whose rows are sum of (1&2, 3&4, 5&6)
2004 Jul 15
3
color scale to label a plot
Hello R-helpers
I want to put a color scale in a plot:
I've got an xy plot where the values of the response (z=f(x,y)) is symbolically given by colors (like heat or rainbow color scale)
I would like to put such a scale with apprpriates labels in the plot, so as to facilitate the interpretation (like in a finite elements result plot)
How is taht possible?
Thanks
Anne
[[alternative
2005 Oct 19
3
adding error bars to lattice plots
Dear R-Users,
how to include error bars within lattice?
How should the panel = function(x,y,...){
looks like?
Does panel.arrows works here as well?
I appreciate any help on this.
Regards,
Mario AT
[[alternative HTML version deleted]]
2006 Apr 24
1
Handling large dataset & dataframe [Broadcast]
Here's a skeletal example. Embellish as needed:
p <- 5
n <- 300
set.seed(1)
dat <- cbind(rnorm(n), matrix(runif(n * p), n, p))
write.table(dat, file="c:/temp/big.txt", row=FALSE, col=FALSE)
xtx <- matrix(0, p + 1, p + 1)
xty <- numeric(p + 1)
f <- file("c:/temp/big.txt", open="r")
for (i in 1:3) {
x <- matrix(scan(f, nlines=100), 100,
2005 Jul 27
4
R Reference Card (especially useful for Newbies)
Newbies (and others!) may find useful the R Reference Card made available by
Tom Short and Rpad at http://www.rpad.org/Rpad/Rpad-refcard.pdf or through
the "Contributed" link on CRAN (where some other reference cards are also
linked). It categorizes and organizes a bunch of R's basic, most used
functions so that they can be easily found. For example, paste() is under
the
2006 Mar 07
7
reading in only one column from text file
How do I manipulate the read.table function to read in only the 2nd
column???
[[alternative HTML version deleted]]
2006 May 16
3
everytime I download a new version of R, need I reinstall all packages?
Can the packages that I've installed in R 2.2.1 be automatically imported to
R 2.3.0?
Otherwise it is a hassle everytime I update a new version of R...
[[alternative HTML version deleted]]
2006 Apr 06
5
pros and cons of "robust regression"? (i.e. rlm vs lm)
Can anyone comment or point me to a discussion of the
pros and cons of robust regressions, vs. a more
"manual" approach to trimming outliers and/or
"normalizing" data used in regression analysis?
2006 Jun 28
5
Theora & Vorbis on your mobile phone
Hey guys + gals,
Would you know where to point me to for an open source or commercial implementation of Theora & Vorbis for your mobile phone?
Maybe as a Symbian app? Maybe a Java midlet?
I'd like to be able to download & play video files to the mobile as well as maybe stream them too? Am I asking too much? :-)
Thanks in advance for your help!
Callum.
2006 Mar 30
2
R Reference Card (especially useful for Newbies)
Newbies (and others!) may find useful the R Reference Card made available by
Tom Short and Rpad at http://www.rpad.org/Rpad/Rpad-refcard.pdf or through
the "Contributed" link on CRAN (where some other reference cards are also
linked). It categorizes and organizes a bunch of R's basic, most used
functions so that they can be easily found. For example, paste() is under
the
2005 Oct 14
4
Setting working directory interactively within a function
Is there anyway to have a function prompt the user for a working
directory, equivalent to file.choose()?
--Paul
2006 Sep 13
7
inserting columns in the middle of a dataframe
Dear R users:
Is there a built-in and simple way to insert new columns after other columns
in a dataframe?
I.e. currently I have:
V1 V2 V3 V4
[1,]
[2,]
Etc.
But I want
V1 V5 V2 V3 V4
[1,]
[2,]
Etc.
Can this be done in one line?
Jon Minton
[[alternative HTML version deleted]]
2006 Jun 22
1
High breakdown/efficiency statistics -- was RE: Rosner's test [Broadcast]
What would be nice is to have something like a "robust" task view...
Andy
From: Berton Gunter
>
> Many thanks for this Martin. There now are several packages
> with what appear to be overlapping functions (or at least
> algorithms). Besides those you mentioned, "robust" and
> "roblm" are at least two others. Any recommendations about
> how or
2005 May 06
4
Choices from a matrix
Could someone please suggest a more clever solution to the following problem than my loop below?
Given X a 2xN matrix X, and I a k-subset of N,
Generate the (2^k)xN matrix Y with columns not in I all zero and the other columns with all choices of an entry from the first or second row of X.
For example, with
X <- matrix(1:8, nrow=2)
I <- c(1,3)
X is
1 3 5 7
2 4 6 8
and Y should be
1 0 5
2006 Apr 24
6
Handling large dataset & dataframe
Hi,
I have a dataset consisting of 350,000 rows and 266 columns. Out of 266 columns 250 are dummy variable columns. I am trying to read this data set into R dataframe object but unable to do it due to memory size limitations (object size created is too large to handle in R). Is there a way to handle such a large dataset in R.
My PC has 1GB of RAM, and 55 GB harddisk space running
2005 May 24
3
obtaining first and last record for rows with same identifier
I have a dataframe that contains fields such as patid, labdate, labvalue.
The same patid may show up in multiple rows because of lab measurements on
multiple days. Is there a simple way to obtain just the first and last
record for each patient, or do I need to write some code that performs that.
Thanks,
Steven
2005 Aug 08
3
reverse order of matrix rows
Quick question: how can I reverse the order of the rows in a matrix?
i.e. make the last row first and the first row last, etc.?
2008 Mar 24
6
vlookup in R
Hi,
Is there are function similar to excel vlookup in R. Please let me know.
Thanks,
Sachin
____________________________________________________________________________________
[[alternative HTML version deleted]]
2006 Aug 21
1
Dataframe modification
Hi,
How can I accomplish this in R.
I have a Dataframe with 3 columns. Column B and C have same elements. But column A has more elements than B and C. I want to compare Column A with B and do the following:
If A is not in B then insert a new row in B and C and fill these new rows with
B = A and C = 0. So finally I will have balanced dataframe with equal no of rows (entries) in