similar to: naming list elements

Displaying 20 results from an estimated 1400 matches similar to: "naming list elements"

2006 Dec 28
3
importing bitmap images to R
All - I'm creating some plots in R that I would like to overlay on images that are created outside of R. I've used "image" before to plot image-like data within R, and have added vector plots on top of them, but I can't find a way to read in an external bitmap file into R and use that. Currently the external files are .png's, but I could generate a few other types,
2003 Apr 11
4
Can I improve the efficiency of my scan() command?
Hi, Suppose I use the following codes to read in a data set. ############################################### > rating <- scan("../Data/Rating.csv", + what = list( + usage = "", + mileage = 0, + sex = "", + excess = "", + ncd = "", +
2000 Nov 19
1
Bug in stars function (PR#738)
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --1465796871-645734172-974620647=:18687 Content-Type: TEXT/PLAIN; charset=US-ASCII Hi all, I've discovered and (hopefully) fixed a bug in the stars function I wrote some time ago.
2005 Nov 15
4
changing the value of a variable from inside a function
All - I am trying to write R code to implement a recursive algorithm. I've solved the problem in a klunky way that works, but uses more memory and computing time than it should. A more elegant solution than my current one would require updating the values of a variable that is located in what I will call the "root" environment - that environment from which the original call
2004 Apr 02
3
Doing SQL GROUP BY in R
I want a list of the number of times some factor levels appear together, similar to the following SQL statement: SELECT A, B, COUNT(C) FROM TBL GROUP BY A, B How do I do that with a data.frame in R? Thanks, Jesper Frickmann Statistician, Quality Control Novozymes North America Inc. 77 Perry Chapel Church Road Franklinton, NC 27525 USA Tel. +1 919 494 3266 [[alternative HTML version deleted]]
2002 Aug 15
2
complex splits
Hi everyone, I'm having trouble figuring out how to split a dataframe more than once. Let's say I have a dataframe d with a certain column called splitcol composed of four possible ordinal values. The same dataframe has two other columns, col1 and col2, that have one of two possible values each. I'd like to split d$splitcol based on col1 and col2 so I can report frequencies of the
2004 Apr 20
2
Creating variable names
My apologies for asking what is doubtless a dumb question, but I have scant experience in R. It would be very convenient in doing lots of plots to be able to do them in a loop that stepped through a vector of variable names. For example one could say x<-("mydates") y<-c("foo1","foo2","foo3") #where "foon" were vectors
2002 Apr 23
3
stacking vectors of unequal length
R-users -- I would like to make a single vector out of something like the following: y0 <- rep(0,100) y1 <- rep(1,20) and stack them one on top of the other to a vector y with length 120. Thanks, Dan =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Dan Powers Associate Professor, Sociology University of Texas at Austin
2005 Apr 05
2
GLMs: Negative Binomial family in R?
Greetings R Users! I have a data set of count responses for which I have made repeated observations on the experimental units (stream reaches) over two air photo dates, hence the mixed effect. I have been using Dr. Jim Lindsey's GLMM function found in his "repeated" measures package with the "poisson" family. My problem though is that I don't think the poisson
2002 Sep 10
3
print
Hi all, Suppose I have a vector Fruits <- c('Apple','Orange','Pear','Banana','Mango') I want to print the statement "The fruits in the basket are: Apple, Orange, Pear, Banana, Mango" If I do: print(paste('The fruits in the basket are:',Fruits)) The output is: [1] "The fruits in the basket are: Apple" "The fruits in
2002 Sep 27
4
r-help search
I'd like to search the r-help archives. Is there a way? I want to find out how to impute missing values. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To:
2002 Apr 18
3
Variable definition problem
Hello, what does this error message indicate and how do I avoid this? (sample code below) Thank you. -Tosh #read in the data table co<-read.table("co.txt",header=T,as.is=T) for (i in 1:3){ paste("logco",i, sep="")<-log(co$co[co$day==i]) } Gives the error: Error: Target of assignment expands to non-language object
2005 Mar 29
2
matching vectors against vectors
Hi all. I have a re-occuring typical problem that I don't know how to solve efficiently. The situation is the following: I have a number of data-sets (A,B,C,...) , consisting of an identifier (e.g. 11,12,13,...,20) and a measurement (e.g. in the range 100-120). I want to compile a large table, with all availabe identifiers in all data-sets in the rows, and a column for every
2005 Feb 18
4
R & bash script
Hi how is it possible to use more than one command when i'm didn't want use R CMD BATCH for specific reason? $ echo "(x<-1:10)" | R --vanilla works $ echo "(x<-1:10 ;y<-20:30 ;lm(y ~ x))" | R --vanilla works not. Is it further possible using bash variables like $i from a loop in the bash echo call i.e. dm$x$i$k <-
2006 Oct 07
3
merge and polylist
Greetings: I would like to kindly ask for a little help. The rough code is: #________________________________________________________ dat=data.frame(read.delim(file="all.txt", header = TRUE, sep = "\t", quote="\"", dec=".",na.strings = "NA")) nc=read.shape("astae.shp", dbf.data=TRUE, verbose=TRUE) mappolys=Map2poly(nc) submap
2000 Nov 20
1
Bug in stars.R (PR#739)
Hi all, Please let me know if this isn't the correct place to report bugs in contributed code. Otherwise, the following code contains one additional line and a short comment above it. The extra line of code catches the unusual situation where a data column contains all 0 values. The corrected code is below the signature. Thanks for your help. Tom Thomas S. Dye, Ph.D.
2001 Jan 11
4
read data into R with some constraints
Hi, I have a big data file (over 30,000 records) looks like this: 100, 20, 46, 70 103, 0, 22, 45 117, -1, 34, 65 120, 15, 0, 25 113, 0, -1, 32 142, -1, -1, 55 ..... I want to read only those records having positive values in all of the four columns. That is, I don't want to read record # 3, 5, and 6 into R. However, when I type: read.csv("data.csv", sep=",")
2002 May 03
3
skipping columns with read.fwf?
I have a file in fwf. It is rather large, about 40,000 rows and 40 variables (columns). I only need about 10 variables form the data set for the analysis at hand. Unfortunately, these 10 variables are not contiguous in the file, for example, the first is position 1-8, the next position 25-27, then 40. Is there a way to read the selected varaibles that I need without reading in the entire data
2001 Sep 25
2
read.table() suggestions
Hi, I understand work is being done to improve read.table(), especially by Prof. Brian D. Ripley. I offer below a version that I wrote, in the hope some aspects of it may prove useful or at least inspire discussion. Be aware that my version differs in a couple fundamental ways that reflect my aversion to dataframes and factors. So it returns a list of vectors which are all character,
2004 Mar 19
5
loop through files in a dir
Hello I have data in many files in a directory, how can I loop through the files in a given dir in-order-to build a data.frame? thanks