Displaying 20 results from an estimated 700 matches similar to: "data.fram zero's"
2009 Mar 26
4
same value in column-->delete
Hi Readers,
I have a question.
I have a large dataset and want to throw away columns that have the same
value in the column itself and I want to know which column this was.
For example
> x<-data.frame(id=c(1,2,3), snp1=c("A","G",
"G"),snp2=c("G","G","G"),snp3=c("G","G","A"))
2010 Apr 13
2
transpose but different
Hi all,
I want to make extra columns in my datafile where the id of every
groupmember is mentioned in separate columns. To explain it better see the
example:
id<-c(1,2,3,4,5,6,7,8,9,10,11,12)
group<-c(1,1,1,1,2,2,3,3,3,3,3,3)
a<-as.data.frame(cbind(id,group))
a
id group
1 1 1
2 2 1
3 3 1
4 4 1
5 5
2009 Mar 20
1
reshape dataframe
Hi,
I have a large dataset on which I would like to do the following:
x<-data.frame(id=c(1,2,3), snp1=c("AA","GG",
"AG"),snp2=c("GG","AG","GG"),snp3=c("GG","AG","AA"))
> x
id snp1 snp2 snp3
1 1 AA GG GG
2 2 GG AG AG
3 3 AG GG AA
And then
2009 Jun 03
1
strsplit for multiple columns
Hi,
I am trying to split multiple columns. One column works just fine, but I
want to do it for multiple columns???
Example
> a
ID V2 V3 V4 V5 V6 V7 V8 V9 V10
1 PBBA0644 -- GG AA -- AA -- AA GG GG
2 PBBA1010 -- GG AA -- AA -- AA GG GG
3 0127ATPR -- GG AA -- AA -- AA GG GG
4 0128EHAB -- GG AA -- AG -- AA AG GG
5 PBBA0829 -- GG AA -- AA -- AA GG AG
2009 Nov 27
1
problem tick marker and text
Hi R-ers,
I am struggling with my x-axis in a association plot. What I would like is
to place the labels of the x-axis between the tick markers and normally the
labels are printed at the place where the tick marker is placed. I don???t
want to move the tick marker (it gives the switch between one chromosome and
the next) but I just want to put the chromosome number in between the
2009 Feb 13
2
select on letter
Hi,
I was wondering if anybody can help me. In the small data set below I would like to select the index which doesn't contain the letter 'N' in the variable 'letters'. How can I discard these rows when the letter has a different position everytime (but the same letter for the whole column)?
index<-c(1,2,3)
letters<-c("CCTTGGAA", "NNTTGGAAT",
2003 Feb 17
2
how to define share for sharing lmhosts?
Hi All,
Probably simple question: I want to make a share for sharing an lmhosts
file which gets included by the clients. This share has to be very
public and accept nullsessions (whatever that me be (no username and
password?)).
I want this because I need to generate aliases on the fly for for our
fileserver for some clients (terminalservers specifically). So I thought
that having an server
2002 Nov 22
2
Add -D_XOPEN_SOURCE_EXTENDED definition for HP/UX 11.00 platform
Hi,
I suggest to add the following definition to configure and its template
configure.in to allow samba-2.2.x to be compiled on HP/UX 11.00 with
some lesser warnings. Without this definition you'll get warnings on all
socket operation because the socket operations are UNIX98 specific and
HP/UX 11.00 will support this when _XOPEN_SOURCE_EXTENDED is defined.
--
Ren? Nieuwenhuizen
Afdeling
2002 Nov 24
1
How to compile samba-2.2.x on HP/UX 11.00
Hi,
Here's my problem:
Samba-2.2.x (even 2.2.7) compiled right out of the box on HP/UX 11.00
gives some errors in the log file:
Nov 23 16:17:32 pandora smbd[6744]: [2002/11/23 16:17:32, 0]
locking/posix.c:posix_fcntl_lock(661)
Nov 23 16:17:32 pandora smbd[6744]: posix_fcntl_lock: WARNING: lock
request at offset 0, length 9223372036854779000 returned
Nov 23 16:17:32 pandora smbd[6744]:
2011 Jun 09
3
How to subset based on column name that is a number ?
Hi,
I have a data frame with column names "1", "2", "3", ... and I'd like to extract
a subset based on the values in the first column. None of the methods I tried
worked (below).
x <- subset(dframe, 1 = = "My Text")
x <- subset(dframe, "1" = = "My Text")
x <- subset(dframe, names(dframe)[1] = = "My Text")
Q
2008 Nov 25
1
Efficient passing through big data.frame and modifying select
> -----Original Message-----
> From: William Dunlap
> Sent: Tuesday, November 25, 2008 9:16 AM
> To: 'johannes_graumann at web.de'
> Subject: Re: [R] Efficient passing through big data.frame and
> modifying select fields
>
> > Johannes Graumann johannes_graumann at web.de
> > Tue Nov 25 15:16:01 CET 2008
> >
> > Hi all,
> >
> >
2012 Mar 30
1
How to use access results of gregexpr in data frames
Hello,
I'm trying to figure out how to find the index of the second occurrence of "/" in a string (which happens to represent a date) within a data frame column.
I've used the following code successfully to find the first instance of "/".
dframe <- data.frame(date=c("5/14/2011", "4/7/2011"))
dframe$x1 <- regexpr("/", dframe[, 1])
2008 Dec 23
1
quotation problem/dataframe names as function input argument.
Dear R friends:
Can someone help me with the following problem? Many thanks in advance.
# Problem Description:
# I want to write functions which take a (character) vector of dataframe
names as input argument.
# For example, I want to extract the number of observations from a number of
dataframes.
# I tried the following:
nobs.fun <- function (dframe.vec)
{
nobs.vec <-
2010 Oct 13
4
Change global env variables from within a function
Hi,
I've looked all over for a solution to this, but haven't had much look
in specifying what I want to do with appropriate search terms. Thus I'm
turning to R-help.
In the process of trying to write a simple function to rename individual
column names in a data frame, I ran into the following problem: When I
rename the columns within my function, I can't seem to get it to
2012 Apr 04
2
Selecting obs within groups defined by 2 variables
Hello,
I am relatively new to R, and I am trying to select the last
observation within a group, where the group is defined by two
variables. One of the variables is a date.
In the below example, C3 varies within C2, which varies within C1. I
need to select the last observation in C3 for 4 groups (C1*C2): 1x,
1y, 2x, and 2y. In my real dataset, C2 is a date (mm/dd/yy)
C1 C2 C3
1 x 1
1
2006 Jan 20
3
Selecting data frame components by name - do you know a shorter way?
Hi! I suspect there must be an easy way to access components of a data frame by name, i.e. the input should look like "name1 name2 name3 ..." and the output be a data frame of those components with the corresponding names. I ´ve been trying for hours, but only found the long way to do it (which is not feasible, since I have lots of components to select):
2006 Jun 09
3
sqlSave() and rownames=TRUE makes my Rgui crash
Hello,
I created a table in MySQL with this command
CREATE TABLE example (pk INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(pk),
id VARCHAR(30),col1 VARCHAR(30),col2 VARCHAR(30))
### In R, I can connect to this table:
library(DBI)
library(RODBC)
chan <- odbcConnect("MySQL51", uid="root", pwd="xxx")
first <- sqlQuery(chan, "select * from example")
2011 May 09
3
asterisk syntax highlighting for gedit
Hi,
Apologies if this is a duplicate - been having mail server issues and I don't think I managed to send it when I tried this morning.
It seems there is no .conf syntax highlighting script available for gedit. I'm thinking of putting one together myself, but don't want to reinvent the wheel.
So I'm just enquiring if anyone knows of one that already exists that i've missed.
2005 Oct 20
2
information about Loess
Hello,
I'm currently using a tool that provides a Loess fitting, but I obtained results that are slightly different from those provided by R implementation of the Loess. That's why I would like to know if you could give me a source (bibliography or web) that explains in a clear way each step of the algorithm, with the possible options to choose, etc.. in order for me to understand those
1999 Oct 19
2
Summary bug?
Hi,
It seems that there's a bug in summary, in the max. output... but max() alone
works fine.
> hw04.dframe$area
...
[41] 1790 1380 1296 2745 798 2306 438649 1481 1559 2450
...
> summary(hw04.dframe)
area
Min. : 798
1st Qu.: 1349
Median : 1690
Mean : 6962
3rd Qu.: 2306
Max. :438600 ### should read 438649
or, to the point,