similar to: Ignore blank columns when reading a row from a table

Displaying 20 results from an estimated 10000 matches similar to: "Ignore blank columns when reading a row from a table"

2008 Jul 01
3
Change name of a specific column of a data frame
Hi, Sorry for the simple question. Is there a way to change the name of only one column of an existing data frame? I know colnames allows you to set the name of all the columns, but only one column in the middle of my data frame needs a new name. Thanks, -Nina
2008 Jun 30
4
Problem reading a CSV
Hi, I have a CSV file where each row has at least 20 columns and some rows have up to 30 columns of data. When I use the command, Pathways<-read.table('MetaCycSample3.csv',sep=',',header=FALSE,quote='"') anything past the 21st column gets kicked down to a new row. How can I fix this? Thanks, -Nina
2008 Jul 17
3
Display variables when running a script
Hi, I know this must be a stupid question, and sorry in advance for being such a noob. But, is there way to get R to display only certain variables when running a script. I know if you want to see the value of a variable when using the interface, you just type it in and hit enter, but is there a command that I can use in a script file that will show the value at a certain point? Thanks, -Nina
2008 Jul 02
2
Problem reading from a data frame
Hi, I have a data frame with strings that have two letters and four numbers. When I store a whole row as a new vector and try to remove the preceding letters using the gsub command, it returns characters of single numbers that have no relation to the numbers in each string. I also noticed that when I view the new vector before using gsub, it includes the original headers from the data frame. For
2008 Jul 22
2
Decoding subscripts/superscripts from CSVs
Hi, I have a CSV file with various biological reactions. Subscripts, superscripts, and italics are encoded in carats, and I was wondering if R can actually recognize those and print actual superscripts, etc. Here's an example: <i>S</i>-adenosyl-L-methionine + rRNA = <i>S</i>-adenosyl-L-homocysteine + rRNA containing
2008 Jul 24
2
Help with which()
Hi, I'm using which to find the position of a value in my data table, and it is returning the correct position and the position of another number that differs by an extra decimal place. For example, when I do: where1<-which(Operons==3573.1,arr.ind=TRUE) it returns the position of that number and of 3573.15. Is it possible to get the function to only return a position if the number
2008 Jun 27
1
Error reading a table
Hi, I get the following error when I try to read in a CSV file: > Path<-read.table('MetaCycSample2.csv',sep=',', header=FALSE) Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : line 17 did not have 5 elements Some of the rows have more columns than others. Also when I try the read.csv command, the very last column, which only has one cell
2008 Jun 18
1
Extract only certain rows from a table
Hi, I have a table where column 1 has ID numbers and column two has data, and I have a vector containing a subset of those ID numbers. How can I create a new table with only the rows from the old table that match the IDs in the vector, like below: Original Table: ID Value 1 123 2 123 3 123 4 123 vect: [2, 3] New table: ID Value 2 123 3 123
2008 Jun 10
1
Really simple question
Hi, I don't have too much programming experience - sorry in advance if this question is very basic, and thanks for the help. I have a vector of numbers and another vector of a subset of those numbers. How can I create a third vector with all the numbers in the original list that aren't in the given subset. Like this: List1 subset --> result 1 1 2 2 3 3 4
2008 Jun 11
1
Search entire table for a value
Hi, I have a table of numbers without any repeats. Is there a function that will search the entire table for a specified value and return the indices if it is found? Also, some rows may have columns without values. Thank you so much, -Nina
2008 Jul 14
1
Help with an error message
Hi, I am writing a very long program that deals with multiple large databases which often have missing data cells and other quirks. I've been testing it on small samples of the data so it doesn't take too long, but when I tried it using the real files, it ran for about a minute and then gave me this error message: Error in matrix(unlist(value, recursive = FALSE, use.names = FALSE), nrow
2008 Jul 30
1
Converting to subscripts and superscripts
Hi, I am reading in a CSV file of chemical reactions where the subscripts and superscripts are encoded in angle brackets, like below: 2 H<SUP>+</SUP> + 2 O<SUB>2</SUB><SUP>-</SUP> Is there a way to convert these to actual sub/superscripts and save them in another excel file? I greatly appreciate the help! Thanks, -Nina PS. I asked this before, but I
2008 Jul 25
1
Insert rows into a pre-existing data frame
Hi, I'm sorry if this is a simple question. How do you insert a blank row into a data frame? I basically need to do this: old table: new table: C1 C2 C3 C1 C2 C3 1 32 34 1 32 34 2 52 23 54 2 52 23
2004 Jun 08
1
mbox configuration
Hi, I change the dovecot.conf default_mail_env = mbox:/Mail/IMAP/%u/:INBOX=/var/mail/%u After I did the change, I restart dovecot with the hope that folder that I create will be stored in /Mail/IMAP/%u. Then I use Mozzila as my email client and change the IMAP server directory to ~nina/IMAP/ which is the link to /Mail/IMAP/nina/. But then I can not create folder anymore from Mozzila, or view
2006 Apr 06
4
weighted kernel density estimate
Dear R-users, I intend to do a spatial analysis on the genetic structuring within a population. For this I had thought to prepare a kernel density estimate map showing the spatial distribution of individuals, while incorporating the genetic distances among individuals. I have a dataset of locations of N unique individuals (XY-coordinates) and an NxN matrix with the genetic distances given as a
2004 May 27
1
automating aov function
I am running the aov function to determine the linear relationship between individual genes and a number of covariates in a micro-array data set. My aov function is working, but I have not been able to write a code to save these results in a matrix. I am using the following code or a slight variation of this code: for(i in 1(length(m[1,])-20) {tmp<- aov(m[,i]~treat, data=m)
2004 Mar 08
2
memory problem
I am trying to upload into R 143 Affymetrix chips onto using R on the NIH Nimbus server. I can load 10 chips without a problem, however, when I try to load 143 I receive a error message: cannot create a vector of 523263 KB. I have expanded the memory of R as follows: R --min-vsize=10M --max-vsize=2500M --min-nsize=10M -max-nsize=50M (as specified in help in R). After running this command the
2003 Jan 29
2
help on cut?
Dear R-users, I'm trying to recode a variable. After using cut(data.vector,breaks=my.breaks,labels=my.label) I need the data.vector to have the same values as the labels. To make it clear: x<-runif(10) y<-cut(x,breaks=c(0,0.3,0.7,0.9,1),labels=c(3,6,7,9)) as.numeric(y) returns something like a vector 1 3 3 2 2 1 4 2 3 4 . I need something like 3 7 7 6 6 3 7 9 6 7 9 for further use. I
2007 May 31
3
Venn diagram
Hello, I am a total beginner with ?R? and found a package ?venn? to create a venn diagram. The problem is, I cannot create the vectors required for the diagram. The manual say: "R> venn(accession, libname, main = "All samples") where accession was a vector containing the codes identifying the RNA sequences, and libname was a vector containing the codes identifying the
2009 Apr 20
2
SEM package
Hi I tried to install the sem package and it was succsessful but I keep getting the following message Paket 'sem' erfolgreich ausgepackt und MD5 Summen abgeglichen Die heruntergeladenen Pakete sind in C:\Users\Dean\AppData\Local\Temp\RtmpVRxlLZ\downloaded_packages aktualisiere HTML Paketbeschreibungen Warning message: In file.create(f.tg) : kann Datei