similar to: How to add a double quote to a string

Displaying 20 results from an estimated 2000 matches similar to: "How to add a double quote to a string"

2010 Apr 26
5
How to make legend with line+ character
Dear all, I have a multiline plot with each line labeled with a different letter. But I'm not able to make the legend display the same kind of pattern '-a-', instead the letter is overwritten by the line. A simpler legend with only the letter is not very visible and the pt.bg does nothing with letters. Any idea? plot(1:10,10:1,lty=1,type='b', lwd=2,pch='a')
2010 Apr 18
2
Table or file as STDIN to the R Script
Hi all, I am trying to call the R script/ R Program via my Shell Script. I need to pass a file to the R script as an argument. When I am trying to do that I am getting error and only first line of the file is being read. Can you tell me how should I do that so that it reads the entire file in a R object so that later I am able to process the matrix operation on that file. It is a tab delimited
2011 Mar 16
2
Removing Bad Data
    I created a couple of timeSeries objects - when I was merging them , I got an error. Looking at the data , I see that one of the time series has   06/30/2007  0.0028       0.0183  0.0122      0.0042  0.0095    -          07/31/2007 -0.0111       0.0255  0.0096     -0.0069 -0.0024  0.0043       08/31/2007 -0.0108      -0.0237 -0.0062     -0.0138 -0.0173 -0.0065       09/30/2007 
2011 Nov 11
2
Win upgrade pb (virus)
I just upgraded my Win7 32bits installation to 2.14.0 after deinstalling 2.12.x First thing I moved the win-library from 2.12 to 2.14 and executed a update.packages(ask='graphics',checkBuilt=TRUE) (Swiss mirror). This aborts with the console message: Error in if (any(diff)) { : missing value where TRUE/FALSE needed And the antivirus (AVG) pops up complaining that colorspace.dll
2010 Sep 16
4
help me understand how things work.
Hello I have some strange output from R and I try to understand how R works. Could you please help me with that? temp <- rbind (c(10,1),c(99,98)) > temp [,1] [,2] [1,] 10 1 [2,] 99 98 > dist(temp) 1 2 131.6435 > sqrt(dist(temp)) 1 2 11.47360 so far so good. until the nex line: when I try to do what i did before but adding the 1/(what I did
2010 Feb 04
3
strange behaviour of median
During some experimentation in preparing R lessons I encountered this behaviour which I can not explain fully mat <- matrix(1:16, 4,4) df1 <- data.frame(mat) > mean(df1) X1 X2 X3 X4 2.5 6.5 10.5 14.5 Expected, documented > median(df1) [1] 6.5 10.5 Rather weird, AFAIK there shall not be an issue with data frame at least I did not find any in help page. I tracked it
2010 Jan 12
3
optim: abnormal termination in lnsrch (resend)
[sorry, forgot some details...] I'm using optim(param, fun, method='L-BFGS-B', lower=lo, upper=up) to minimize a certain function. Often the minimization ends with the message: ERROR: ABNORMAL_TERMINATION_IN_LNSRCH What is optim() trying to say? What have I to change in my function to make the minimization succeed? Do you think using BBoptim() instead of optim() changes anything?
2011 Apr 18
1
Location of libraries in Windows
I'm preparing to install 2.13, so I need a clarification about package location on disk. On window the packages I have installed are under C:\Users\mvalle\R\win-library\2.12 and the ones that come with R are under "C:\Program Files\R\library" If I execute update.packages() from the R gui, it fails because it finds e.g. Matrix as a package that should be updated but the process
2011 Jun 20
1
Can I disable Cairo?
On Linux 2.13 by default links cairo, so png() uses it for rendering. One of my users has performance problem, so ask if it possible to temporary disable cairo during png() rendering so it reverts to grGraphics. My workaround for now is to configure R without cairo, but this affects all users that are forced to load and use CairoDevice if they wants better quality. I want to avoid this, is it
2010 Jan 18
1
density() vs. KernSmooth::bkde
Any advice when to use denstity() and when the KernSmooth package bkde() to smooth a histogram? No specific problem to use either one, but I'm curious why there are two so similar implementations. Thanks! mario -- Ing. Mario Valle Data Analysis and Visualization Group | http://www.cscs.ch/~mvalle Swiss National Supercomputing Centre (CSCS) | Tel: +41 (91) 610.82.60 v.
2009 Jul 21
1
Subsample points for mclust
Hi all! I have an ordered vector of values. The distribution of these values can be modeled by a sum of Gaussians. So I'm using the package 'mclust' to get the Gaussians's parameters for this 1D distribution. It works very well, but, for input sizes above 100.000 values it starts taking really forever. Unfortunately my dataset has around 4.6M values... My question: is it
2010 Jul 14
1
FYI: matrix surprise
Some time ago someone asked for things that make R difficult to master. Here I want to record one R behavior that took me off-guard yesterday. Moral of the story: vectorialize, but don't exaggerate. Hope it helps mario ### A very simple data frame tc <- textConnection( "prefix idx val A 1 11 A 2 22 B 1 33 B 2 44") s <- read.table(tc,
2010 Oct 25
1
Artifacts in filled.contour+pdf
Dear all, I'm using R 2.12.0 on Windows 7 (32bits) I created a filled contour from the attached data using the following code: load('bug.RData') pdf('bug.pdf', width=14, height=7) filled.contour(o4$x, o4$y, o4$z, color=rainbow, xlim=c(4,18), ylim=c(0,35), zlim=c(14,36)) dev.off() If you look (I used acrobat reader 9.4) at the attached bug.pdf, you see an incomplete grid of
2010 Jan 19
3
question on plot in R with mac
-------------------------------------------------------------------------- Hello all My computer is MacBook and I want to draw a plot in R, for example for x <- c(1,3,6,9,12) y <- c(1.5,2,7,8,15) I use this command plot(x,y). but it dosn't work. Could you please help me? thank you khazaei
2010 Feb 25
1
multicore in R
Hi, i have a function: zz<- (constrOptim(c(.5,0), fr, grr, ui=rbind(c(-1,0),c(1,-1)), ci=c(-0.9,0.1))) i can get the result by using command (for example): zz$par now if i can use multicore: zz<-parallel(constrOptim(c(.5,0), fr, grr, ui=rbind(c(-1,0),c(1,-1)), ci=c(-0.9,0.1))) result < collect(zz) i cant get my the result: result$par because multicore add process id. for example:
2010 Mar 12
2
looking for a package to solve current-voltage equation I=f(I)
Hello, I'm looking for a R-package to solve such an equation : http://n4.nabble.com/file/n1590462/iv.png which is one current-voltage equation of a solar cell. Thanks in advance, Ptit Bleu. -- View this message in context: http://n4.nabble.com/looking-for-a-package-to-solve-current-voltage-equation-I-f-I-tp1590462p1590462.html Sent from the R help mailing list archive at Nabble.com.
2010 Mar 23
1
printing text within if functions inside a for loop
Hi I am having a problem with outputting text inside an if function. I have the following code: for (j in 20:length(bb.up)) { if (up[j]==1 && up[j-1]==0) { sprintf("Long on %s at a price of %f",dates[j],data[j]) } if (down[j]==1 && down[j-1]==0) { sprintf("Short on %s at a price of %f",dates[j],data[j]) } } The loop runs fine and the sprintf
2010 May 11
2
sprintf funny behavior
> sprintf("%d",4) [1] "4" > for(i in 1:4) sprintf("%d",4) > for(i in 1:4) print(4) [1] 4 [1] 4 [1] 4 [1] 4 > Why doesn't sprintf like the for loop here
2011 Feb 16
1
sprintf does not print
Dear all I have an sprintf inside a loop to track changes in variable's value. This sprintf statement works if I copy and paste it inside R sprintf('I did the the %d,%d \n',k,l) but when this is inside a loop I get no message. listcounter<-1 for (k in c(1:mmax)){ # for (l in c(1:nmax)){ lst[[listcounter]] <-fun(estimatedsr) listcounter<-listcounter+1
2011 Apr 24
1
EM vs Bayesian
Hello, Is there any literature there that says that the EM is better/worse than a Baysian model when it comes to differentiating univariate mixture of normal distributions? -- Thanks, Jim. [[alternative HTML version deleted]]