similar to: Printing integers in R "as is"

Displaying 20 results from an estimated 8000 matches similar to: "Printing integers in R "as is""

2008 Mar 07
5
Puzzling coefficients for linear fitting to polynom
Hi, I can not comprehend the linear fitting results of polynoms. For example, given the following data (representing y = x^2): > x <- 1:3 > y <- c(1, 4, 9) performing a linear fit > f <- lm(y ~ poly(x, 2)) gives weird coefficients: > coefficients(f) (Intercept) poly(x, 2)1 poly(x, 2)2 4.6666667 5.6568542 0.8164966 However the fitted() result makes sense: >
2007 Nov 10
5
client hangs on pxelinux
Hi, my client pc hangs on pxelinux before starting to fetch the linux kernel. It hangs after printing the ip information row. No traffic is observed at this point on the network. The pxelinux is transferred to the client through a tftp server and with no problems. What options do I have to proceed from this point and try to find out where the problem is? Thanks, Firas. -- Firas Swidan, PhD
2008 Jul 23
3
Quantitative analysis of non-standard scatter plots.
Hi, I am having difficulties in finding ways to analyse scatter plots and quantitatively differentiate between them. Since this is best demonstrated by a figure, I have attached one with 4 subfigures (a)-(d). Qualitatively (and I hope you would agree with me), sub-figures (a), (b), and (d) seem to represent uniform 2d scatters. It is hard for me to quantify it, but it seems as if the envelopes
2005 Apr 19
2
Printing a single "\" character
Hi, I have a small R question: how to print a single "\" character? I have the following results: > print("\") does not work > print("\\") [1] "\\" I need to make the following substitution as well, but it does not work either: > sub("_","\_","g_g") [1] "g_g" Thanks in advance, Firas.
2007 Nov 14
2
PXE in wonderland
Hi, I have collected a bunch of old PII PCs that I am trying to PXE boot. There NICs are old and so I use etherboot floppy to emulate a native PXE boot. I have configured tftp, dhcpd, pxelinux, and all the other stuff. Everything works fine till pxelinux start booting. Then it stucks after printing the IP row. --------------- pxelinux output ----------------------- PXELINUX 3.10 2005-08-24
2006 Aug 01
2
Indexing issue
Hi, R is having the following weird behavior and I am not sure if that is a feature or a bug: I am working on the following "3D" array: > bIm , , 1 [,1] [1,] TRUE [2,] TRUE [3,] TRUE [4,] TRUE [5,] TRUE > class(bIm) [1] "array" > dim(bIm) [1] 5 1 1 When I try to get the first 2D subarray, the whole thing folds into a vector: > bIm[,,1] [1] TRUE TRUE TRUE
2005 Feb 25
3
Loops and dataframes
Hi, I am experiencing a long delay when using dataframes inside loops and was wordering if this is a bug or not. Example code: > st <- rep(1,100000) > ed <- rep(2,100000) > for(i in 1:length(st)) st[i] <- ed[i] # works fine > df <- data.frame(start=st,end=ed) > for(i in 1:dim(df)[1]) df[i,1] <- df[i,2] #takes for ever R: R 2.0.0 (2004-10-04) OS: Linux, Fedora Core 2
2006 Aug 09
2
Speeding indexing and sub-sectioning of 3d array
Hi, I am having a problem with a very slow indexing and sub-sectioning of a 3d array: > dim(arr) [1] 245 175 150 For each point in the array, I am trying to calculate the mean of the values in its surrounding: mean( arr[ (i - radius):(i + radius), (j - radius):(j + radius), (k - radius):(k + radius)] ) Putting that code in 3
2006 Apr 27
1
R interface to ImageMagick
Hi, I was wondering if anyone is aware of an R interface to ImageMagick (www.imagemagick.org)? Since R does not support a lot of image processing functions, having such an interface could be very useful. Alternatively, ImageMagick has a couple of different interfaces (including to C and C++). I was wondering if one can use these to call ImageMagick functions from R. I am posting a similar
2008 Aug 13
1
The standard deviation of measurement 1 with respect to measurement 2
Hi, I have two (different types of) measurements, say X and Y, resulting from the same set of experiments. So X and Y are paired: (x_1, y_1), (x_2, y_2), ... I am trying to calculate the standard deviation of Y with respect to X. In other words, in terms of the scatter plot of X and Y, I would like to divide it into bins along the X-axis and for each bin calculate the standard deviation along
2005 Apr 01
2
about get stdout from other program
Dear all R-helper, if I want to use stdout from other language as my R program input ,which is the best way for design the API,using Pipe function or produce a temporary file,using scan function to read the file ? thanks Michael
2006 May 19
2
"Pipelining" programs in R
Hello... I would like to use R for 'pipelining' data among several programs. I'm wondering how I can use R to call another program, feed that program a set of parameters, and retrieve the output. E.g., I have an executable that, when opened, prompts the user to enter a set of parameters. The program then executes & prompts the user for the name of an output file. I need to
2005 Apr 12
5
How allocate STRSXP outside of gc
Hi, I am trying to figure a way to allocate a string SEXP so that gc() won't ever collect it. Here is a little bit of a background. Suppose I want to write a .Call-callable function that upon each call returns the same value, say mkChar("foo"): SEXP getFoo() { return mkChar("foo"); } The above implementation doesn't take advantage of the fact that
2005 Mar 02
1
R 2.1.0 scheduled for April 18
The release schedule has now been set with a release date on April 18. The detailed procedure can be found at http://developer.r-project.org/ (it is not quite there yet, but will appear after a short propagation delay.) The main point for non-developers is that we start making alpha tarballs on March 21 and beta tarballs on April 4. Only very simple and/or critical bugs are fixed in the last
2005 Sep 14
1
Long lines with Sweave
I have used Sweave a lot the latest year, but never really used any long function calls. If I have code which look like this ------------------------------------------------------------- gof <- benthic.flux(ID="Gulf of Finland", meas.conc=conc, bw.conc=bw.conc, time=times,
2006 Jul 13
2
VERY TINY question: missing function to clear the console?
Hi, for presentation purposes I would like to clear to whole console window (like in a UNIX terminal: 'clear'). Is there such a function? If not, I could image that is not too hard to write such a function. Cheers, Hans
2008 Apr 08
1
Question Regarding 'pipe'
Can anyone point out why this is not working? y<-read.table(pipe(' awk '{ n = $1; sub( ".*" $1 " " ,"") ; while ( n-- ) print }' temp.txt ')) [[alternative HTML version deleted]]
2008 Jun 09
2
Plot timer in a for loop
Hello, This code works fine but is so fast I can't see anything but the last plot. for (i in nrow(X)){ plot(as.numeric(d[i,])) } I'd like to view a plot every 500 milliseconds, nrow(X) = 400. How? Thanks -- View this message in context: http://www.nabble.com/Plot-timer-in-a-for-loop-tp17741975p17741975.html Sent from the R help mailing list archive at Nabble.com.
2005 Feb 01
1
Process to both write to and read from (pipe/fork)?
Dear all, I would like to start a process from an R program in such a way that I can both feed input into the process and read the process's output. It seems that in R, I can have a pipe for writing into another process's input or a pipe for reading from another process's output, but not both. Doing both necessitates forking, such that the child can start the external process and
2005 Feb 01
1
Process to both write to and read from (pipe/fork)?
Dear all, I would like to start a process from an R program in such a way that I can both feed input into the process and read the process's output. It seems that in R, I can have a pipe for writing into another process's input or a pipe for reading from another process's output, but not both. Doing both necessitates forking, such that the child can start the external process and