similar to: character -> list

Displaying 20 results from an estimated 30000 matches similar to: "character -> list"

2003 Jul 08
7
rbind question
Hi I am trying to replicate a vector in n rows for comparison purposes with another matrix. foo <- c(1,2,3) bar <- rbind(foo,foo) # does the trick for 2 rows bar <- rbind(rep(foo,2)) # does something else How do I generate a matrix with all rows=foo without writing 'foo' n times as arg? Thanks, David
2010 Dec 14
2
How to left or right truncate a character string?
Hi R-helpers, I have a character string, for example: "lm(y ~ X2 + X3 + X4)" from which I would like to strip off the leading and trailing quotation marks resulting in this: lm(y ~ X2 + X3 + X4) I have tried using gsub() but I can't figure out how to specify the quotation mark using a regular expression. Alternatively, I would like a function that lets me delete the leading
2004 Apr 25
2
nonparametric multiple sample comparison
Hello all, Here goes one of my first functions. I want to make a nonparametric multiple sample comparison with unequal sample sizes (see Zar?s Biostatistical Analysis, 3rd. Ed., pg. 201 Example 10.11, pg. 288 Example 11.10). In the real world, I want to compare samples of fish length captured with different fishing gears. After using the Kruskal-Wallis test I want to check the differences
2003 Jul 08
4
how to rename rows/columns of a matrix?
Hi I get a matrix with the columns named like "X13 X22 X1 X14 ...", i.e. not successively. That has it's good reasons, but now how can I rename the columns to "X1 X2 X3 ..."? Thanks a lot, David
2008 Jun 27
1
use of quotation marks
Dear R Users. I just discovered today a problem in the use of quotation marks when I'm doing some programs in R. I'm using windows vista environment. The programs that I wrote in the University, made in Windows XP machines run perfectly, but when I run those in my laptop with VISTA, there are many errors. Those errors are due to the type of quotation marks. In the university the quotation
2008 May 05
2
Character entry mismatch in the console window
Dear R users, I have just de-installed my old R 2.4.1 and installed R 2.7.0. I downloaded this version from the South African mirror, as I am currently working in South Africa. When trying to paste any of my old analyses into the console (I keep them in word-documents), I get an error when I first try to load the data with the following line (example): lap.long.dist <-
2004 Mar 09
2
use of split lines in ess
Hi all I am very astonished that R generates a "syntax error" when I want to split up a line with a backslash, which usually works in any shell script. R itself generates the "+" symbols at the beginning of following lines in a splitted line so I've tried with them as well, but also without success. Searching in the h-help archive did not reveal any answer either.
2005 Apr 30
3
How to extract function arguments literally
Dear all, One of my friends asked me if it is possible to extract actual R function arguments literally (precisely, as strings). The reason is simple. He feels sometimes awkward to attach quotation marks :-). What he actually wants is to pass R command arguments to XLisp subroutines (He has been an enthusiastic XLisp user for a long time and still tends to use R as a wrapper to XLisp). Is it
2012 Jun 06
3
Removing Double Quotations After Using Cbind
Hi, I am trying to process genomics data and the presence of both characters and integers in an array is giving issues. The following is an example: > a<-array(c(2,2,"X",1:3,2:4),dim=c(3,3)) > b<-cbind(a[,1],a[,2]) With the output being: [,1] [,2] [1,] "2" "1" [2,] "2" "2" [3,] "X" "3" Is there any
2003 Jul 15
2
matrix manipulations
Hi cor(x,apply(x,1,sum)) gives me the correlations of each column with the sums of each row (correct me if I'm wrong, please). What I need are the correlations of each column with the sums of each row except the entry in the given column. It seems that for any one column i I get it by doing: cor(x[,i],apply(x[,-i],1,sum)) But I struggle to get it for all the columns. I was trying things
2006 Sep 04
3
opening files in directory
Hi there I want to be able to take all the files in a given directory, read them in one at a time, calculate a distance matrix for them (the files are data matrices) and then print them out to separate files. This is the code I thought I would be able to use (all files are in directory data_files) for(i in 1:length(files)) + { + x<-read.table("data_files/files[[i]]") +
2008 Feb 22
3
Simultaneously summarizing many models
Dear R users, Let?s say I have 10 models, each named m1,m2,m3..., and I would like to summarize them automatically and simultaneously - e.g., to extract parameter estimates later on from all models; how can I do that? I have tried: x=1:10 #this creates some example data y=rnorm(10) m1=lm(x~y) m2=lm(x~1) sum.lms=function(x)summary(paste("m",x,sep="")) sum.lms(1:2) but
2008 Dec 08
2
I need to run windows program with command line parameters?
In Windows; to have Firefox pass psyn links to the Curse client I use this command: Code: "C:\Program Files\Curse\CurseClient.exe" -url "%1" but when I try to get Linux's Firefox to pass the psyn link to the Curse client running in wine, wine of course assumes that -url and the quotation marks are for it and not the actual Windows command it's meant to run. How do I
2010 Sep 12
4
using read.table, removing extra quotation mark from a text field? (e.g. ""cat" )
I am using read.table to import a text file within R.   There are several "errors" in my text file.  An "extra" quotation mark has inadvertently been included within a few text fields.   e.g. for a pipe (|) delimited text file, I have something similar to this:   1|7|30| "dog" 2|6|25| ""cat" 3|4|20|"" 4|5| 56| "mouse" 5|3|56|
2017 Sep 19
2
what do you think about write.table(... qmethod = "excel")?
On 19/09/2017 4:10 PM, Ista Zahn wrote: > On Tue, Sep 19, 2017 at 1:04 PM, Paul Johnson <pauljohn32 at gmail.com> wrote: >> Last week one of our clients reported trouble with a csv file I >> generated with write.table. He said that columns with quotes for >> character variables were rejected by their data importer, which was >> revised to match the way Microsoft
2012 Aug 06
2
Straight-quotes for usage and examples sections in PDF docs?
Is there any way to ensure that quotation marks are left as straight quotes and not converted to curly quotes in the \usage and \examples sections when the pdf versions of the docs are created?
2019 Mar 21
1
imap ---- LIST "" * The returned mailbox does not display quotes
dovecot version v2.2.29 v2.2.36 v2.3.5 LIST "" * The returned mailbox does not display quotes dovecot version v2.1.17 LIST "" * The returned mailbox shows quotation marks Why is the quotation mark removed in the new version? Is there any configuration option in the new version to add quotes? Because I see a lot of big public mailboxes with quotation marks.
2017 Sep 19
3
what do you think about write.table(... qmethod = "excel")?
Last week one of our clients reported trouble with a csv file I generated with write.table. He said that columns with quotes for character variables were rejected by their data importer, which was revised to match the way Microsoft Excel uses quotation marks in character variables. I explained to them that quoted character variables are virtuous and wise, of course, but they say Microsoft Excel
2006 Jul 16
1
Generating valid R code using R
Hi, I'm trying to generate valid R code using R. Parts of the task is to read a sequence of characters from file and escape them such that they can be put in quotation marks to form a valid R code string. Example: Let the input file be (four rows containing ASCII 0-255 characters): abcdef<tab>ghijk\nlmno second row\t\a\\ fourth and so on... <EOF> Now, find escapeString() such
2006 Jul 16
1
Generating valid R code using R
Hi, I'm trying to generate valid R code using R. Parts of the task is to read a sequence of characters from file and escape them such that they can be put in quotation marks to form a valid R code string. Example: Let the input file be (four rows containing ASCII 0-255 characters): abcdef<tab>ghijk\nlmno second row\t\a\\ fourth and so on... <EOF> Now, find escapeString() such