similar to: Searching the console

Displaying 20 results from an estimated 500 matches similar to: "Searching the console"

2012 Nov 03
8
Can you turn a string into a (working) symbol?
Dear folks-- Suppose I have an expression that evaluates to a string, and that that string, were it not a character vector, would be a symbol. I would like a function, call it doppel(), that will take that expression as an argument and produce something that functions exactly like the symbol would have if I typed it in the place of the function of the expression. It should go as far along the
2013 Dec 09
2
How can I find nonstandard or control characters in a large file?
I have a humongous csv file containing census data, far too big to read into RAM. I have been trying to extract individual columns from this file using the colbycol package. This works for certain subsets of the columns, but not for others. I have not yet been able to precisely identify the problem columns, as there are 731 columns and running colbycol on the file on my old slow machine takes
2012 Nov 13
5
Getting information encoded in a SAS, SPSS or Stata command file into R.
Dear folks ? I have a large (26 gig) ASCII flat file in fixed-width format with about 10 million observations of roughly 400 variables. (It is 51 years of Current Population Survey micro data from IPUMS, roughly half the fields for each record). The file was produced by automatic process in response to a data request of mine. The file is not accompanied by a human-readable file giving the
2013 Jan 15
2
Sparse dataframes?
Dear Folks-- Is there a data frame analog to sparse matrices? I am working with a panel data set that has a large number of variables that are redefined repeatedly or exist for only a few years (out of 48). In my current structure, where variables are columns and rows are years, more than 90 percent of the cells and more than 3/4 of the total size of my file are NAs. I am wondering if there is
2011 Aug 16
1
Can you send "side effect" text into a variable?
Dear folks -- There are a number of functions -- I am thinking of str() as an example -- that produce text as a side-effect, rather then returning it. Is there any way to send the text produced by such functions into a character variable? Any suggestions would be greatly appreciated. andrewH -- View this message in context:
2012 Oct 11
1
replacing ugly for loops
I have a couple of hundred American Community Survey Summary Files files containing rectangular arrays of data, mainly though not exclusively numeric. Each file is referred to as a sequence (henceforth "seq"). From these files I am trying to extract particular subsets (tables) consisting of a sets of columns. These tables are defined by three numbers (now in columns in a data frame):
2011 Sep 16
2
Referring to an object by a variable containing its name: 6 failures
Dear Folks-- I'm trying to make a function that takes the columns I select from a data frame and then uses a for loop to print some information about each one, starting with the column name. I succeed in returning the column name, but nothing else I have tried using the variable colName, containing the name of the column, to refer to the column itself has worked. Below I show my
2011 Oct 27
2
Consistant test for NAs in a factor when exclude = NULL?
Dear folks? Is there a function to correctly find (and count) the NAs in a factor when exclude=NULL, regardless of whether their origin is in the original data or by subsequent assignment? In example number 1 below, where NAs are assigned by is.na()<-, testing the factor with is.na() finds the correct number of NAs. In example number 2, where the NAs are from the data, neither is.na(), ==NA,
2012 Nov 27
1
Using factor variables with overlapping categories
ear folks ? I have a question, though it is more of a logic- or a good practices-question than a programming question per se. I am working with data from the American Community Survey summary file. It is mainly categorical count data. Currently I am working with about 40 tables covering about 35 variables, mainly in two-way tables, with some 3-way and a handful of four-way tables. I am going to
2011 Oct 05
6
reporting multiple objects out of a function
Dear folks, I?m trying to build a function to create and make available some variables I frequently use for testing purposes. Suppose I have a function that takes some inputs and creates (internally) several named objects. Say, fun1 <- function(x, y, z) {obj1 <- x; obj2 <- y; obj3 <- z <missing stuff> } Here is the challenge: After I run it, I want the objects to be
2011 Jul 09
3
Using str() in a function.
Using str() in a function. I am in the early phase of learning R, and I find I spend a lot of time trying to figure out what is actually in objects I have created or read in from a file. I'm trying to make a simple little function to display a couple of things about a object, let's say the summary() and the str(), sequentially, preferably without a bunch of surplus lines between them. I
2013 Mar 04
4
Learning the R way – A Wish
There is something that I wish I had that I think would help me a lot to be a better R programmer, that I think would probably help many others as well. I put the wish out there in the hopes that someone might think it was worth doing at some point. I wish I had the code of some substantial, widely used package ? lm, say ? heavily annotated and explained at roughly the level of R knowledge of
2004 Feb 23
2
deleting elements from an array/object
Hello, I created a simple histogram with: myHist<-hist(myData) the object myHist now has two arrays (among the others): myHist$mids myHist$counts Since myHist$counts contains some "0", and I want to calculate the linear fit among myHist$mids and log(myHist$counts), I want remove the elements of both arrays where these "0" occurs. which are the possible solutions to
2012 Jul 25
1
[PATCH] fish: Use minimal permissions when initially creating history file
--- fish/fish.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fish/fish.c b/fish/fish.c index ded80ec..9bb8c90 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -1455,7 +1455,7 @@ cleanup_readline (void) int fd; if (histfile[0] != '\0') { - fd = open (histfile, O_WRONLY|O_CREAT|O_NOCTTY|O_CLOEXEC, 0644); + fd = open (histfile,
2008 Jun 16
4
Superimposing Line over Histogram in Density Plot
Hi, Currently I have a density plot generated with this snippet. Is there a way I can add a line curve on top of it? I mean in one figure __BEGIN__ myhist <- hist(x col="blue", main = "Density Plot", xlab = "Exp Level", ) __END__ - Gundala Viswanath Jakarta - Indonesia
2006 Apr 27
3
relative frequency plot
Hi All, I want to use "hist" to get the relative frequency plot. But the range of ylab is greater than 1,which I think it should be less than 1 since it stands for the probability. Here is my code: x<-c(1,1,1,0,0,1,1,5,1,1,0,1,1,0,1,0,1,1,0,0,1,1,1,1,1,1,1,1,1,4,1,0,2,1,1,1 ,1,1,0,0,1,0,1,1,1,1,1,1,1,1,1)
2012 Jan 10
1
[PATCH] fish: Do not emit error message if history file cannot be open for writing.
The error message generated by perror() is not particularly useful to the user. Many other command line programs that can keep history around cope silently if they can't create or write to their history file. --- fish/fish.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/fish/fish.c b/fish/fish.c index b782b7c..bf976ea 100644 --- a/fish/fish.c +++ b/fish/fish.c @@
2010 Nov 10
1
par mfrow in "function" problem
Hi all, I defined the following ############################# myhist=function(x){ hist(x,xlab="",main="") h=hist(x) xfit=seq(min(x),max(x),length=100) yfit=dnorm(xfit,mean(x),sd=sd(x)) yfit=yfit*diff(h$mids[1:2])*length(x) lines(xfit, yfit, col="blue", lwd=2) } ############################# individually, it worked fine however, if I used par(mfrow=c(2,2))
2003 Oct 13
1
Rotate a plot, and subplot
Hi all, Is there a way to rotate a plot, e.g. a histogram, by a certain angle (90/180/270 degress)? I spent hours trying to figure out how this is done, but without success. Also, I'm looking for an equivalent to the S-Plus "subplot" command to insert a kind of "thumbnail" graphic into a bigger one. How is this best done in R? Thanks for your help Pascal
2008 Apr 14
2
Histogram Label Font Size
Hi! I'm having a trouble changing font size of histogram label. I have tried help(hist), but I couldn't find anything explain how to fix label's font size. Could you help me please? Thank you. _________________________________________________________________ Going green? See the top 12 foods to eat organic. 1N1653A [[alternative HTML version deleted]]