Displaying 20 results from an estimated 9000 matches similar to: "Possible or not possible: serif axis labels with plotmath [but everything else sans serif]?"
2011 Sep 19
3
Replace a for loop with a function
Hi all,
I would like to replace the for loop in the code below with a function
to improve the speed and to make the script more efficient.
The loop creates a vector of integers (x) with the probability of f for
each integer.
The length of f is variable, but sums to 1.
I tried to use a function with optional arguments which did not work.
Here is the code:
f <- data.matrix(c(0.5,0.15,0.35))
2009 Aug 12
2
Superscripts in axis label
Hi All,
I am trying to lable the y-axis on my scatterplot with the following:
"Soil moisture content (m3m-3)"
I am using the following coding for plotting the graph:
plot(soilmoisture~gradientlevel, xlab="Levels of droughting gradient", ylab="Soil moisture content (m3m-3)", bty="l", font.main="2", pch=16, las=1, cex.lab="1.13")
I have
2009 Jul 31
1
colored 3D pillar plots
hi,
I'd like to do graphs like shown on the right panel on the following link:
http://www.clinchem.org/cgi/content/full/53/8/1544/F1
(if link doesn't work see attached file)
Any help and ideas highly appreciated, thanks in advance.
Thomas von K?nel
Human Genetics
Uni Berne
2009 Oct 21
1
slope calculation
Dear all
I am new R user, and trying to learn more.
I am doing linear regression analysis in R with my data. I am trying to find the way to calculate the slope value (coefficient of x) to degree of slope. Please give me idea on this.
Thanking you in anticipation
Warm regardMS
_________________________________________________________________
[[alternative HTML version
2010 Mar 31
2
Printing the function t.test() in R
Dear R Users,
I have a question, how does one print an r function like t.test in R (to get
the whole function and not just a summary of the environment)? For example
if I type the following:
> t.test
function (x, ...)
UseMethod("t.test")
<environment: namespace:stats>
> print(t.test)
function (x, ...)
UseMethod("t.test")
<environment: namespace:stats>
I
2009 Sep 30
3
programming to calculate variance
Dear R-user
Suppose I have the following data
y=c(2,1,5,8,11,3,1,7,50,21,33,7,60)
x=data.frame(y)
for(i in 4:nrow(x)) x[i,] =var(x[i-3:i-1,])
I'm trying to get a new variable with the variance of the 3 previous values
(just an example) and with NA in the three first positions. I know that my
for() is wrong
but I'm not able to find my error.
Any idea?
Thanks,
Marlene.
2011 Sep 28
3
Plotting Lines Through multiple groups
Hi I have data in the following format
Cort Day Animal
23 0 1
27 3 1
24 0 2
27 1 2
34 2 2
30 3 2
24 4 2
20 0 3
24 1 3
28 2 3
34 4 3
etc.
It is measured across time(day) however no every individual is measured the
same number of times. All I want to do is plot the Raw data and then run a
line connecting the
2011 Sep 29
2
String manipulation with regexpr, got to be a better way
Help-Rs,
I'm doing some string manipulation in a file where I converted a string date in mm/dd/yyyy format and returned the date yyyy.
I've used regexpr (hat tip to Gabor G for a very nice earlier post on this function) in steps (I've un-nested the code and provided it and an example of what I did below. My question is: is there a more efficient way to do this. Specifically is
2011 Sep 16
2
Numeric Characters in String
Dear all,
I have a vector, which looks about like this:
str <- c("14.XYZ", "15.ABCDE", "16.dkieowo", "120.EIDKAI")
I need to extract the numerical characters out of the string, so I receive
in the end a normal vector containing:
vec <- c(14, 15, 16, 120)
I need a generic solution for this. My actual vector contains about 403
2008 Aug 15
6
Saving environment object
Hi,
When I create an environment object with new.env() and populate it with
values then how can I save it into an .RData file properly, so it can be
loaded later on in a new session?
Saving an environment object with save() or save.image() results in an error
message when loading again:
Error: protect(): protection stack overflow
Regards,
benjamin
======================================
2011 Sep 08
6
Searching the console
Is there any way to search the console during an interactive session? I've
looked and looked, and can not find one. In some add-on package, maybe?
Sorry to be so basic, but help would be greatly appreciated.
andrewH
--
View this message in context: http://r.789695.n4.nabble.com/Searching-the-console-tp3797884p3797884.html
Sent from the R help mailing list archive at Nabble.com.
2011 Jul 29
2
Changing font type within y axis labels
I wish place the following axis label in such a manner that some of the
text is plain and the scientific name is in italics (i.e. a mixture of
two font types)
Using plot:
mtext("Total Landings of Pecten maximus (tonnes)",font,=3, side=2,
line=3)
makes everything italic, but how do I apply the font change to only
"Pecten maximus"?
Rgds
Phil
2011 Sep 06
2
subsetting tables
Hi guys,
one of the questions where you need a real human instead of a search engine,
so it would be great if you could help.
I have a matrix of z-scores which I would like to filter, sometimes
columnwise, sometimes rowwise. Data looks like this:
Allstar hsa.let.7a hsa.let.7a.1 hsa.let.7a.2
2 0.87 0.79 -0.57 1.07
3 0.67 -1.14 -0.78 -0.95
4
2011 Oct 10
3
How to test if two C statistics are significantly different?
Hey all,
In order to test if a marker is a risk factor, I built two models (using cox
proportional hazard model). One model included this marker, and the other is
not.
Then, I use R package risksetROC to test how much predictive value did the
marker add to this model. I get two C statistics by analyzing the linear
predictors of the two models into this package.
The qustion is How to test if two
2012 Feb 21
2
Using substitute in nested function calls
Dear List members,
I really, like the feature that one can call R functions with
mathematical expressions, e.g.
curve(x^2, 0, 1)
I wonder, how I can construct in a simple way a function like
mycurve = function (expr) {...}
such that that a call
mycurve(x^2)
has the same effect as the call
curve(x^2, -100,100)
Below is some code that works, but it seems much to complicated: it
first
2012 Aug 02
6
Polygon shaded area
Hi all,
I have two vectors (columns) called "efinal" and "efinal 2".
I want to plot them on the same plot and "draw" a shaded area beween the
two lines using function polygon
I have tried all but I don ?t understand the polygon area, can you help me
with examples?
plot(efinal,type="l",ylim=range(min(efinal2),
2011 Oct 22
7
"Plotting" text?
I noticed that the text() command adds text to a plot. Is there a way to
either make the plot blank or add text to a "blank sheet". I would like
to "plot" a page that contains just text, no plot lines, labels, etc.
Suggestions?
Kevin
[[alternative HTML version deleted]]
2011 Sep 21
1
Problem with predict and lines in plotting binomial glm
Problems with predict and lines in plotting binomial glm
Dear R-helpers
I have found quite a lot of tips on how to work with glm through this mailing list, but still have a problem that I can't solve.
I have got a data set of which the x-variable is count data and the y-variable is proportional data, and I want to know what the relationship between the variables are.
The data was
2009 Mar 24
3
r online
Hi,
I'd like to execute simple commands and functions in R through a
website, is there any service like this somewhere?
I only found http://www.osvisions.com/r-online/ but it does not work
(last update 2003) and the links to releated websites only give errors
(if I calculate 7+3).
Thanks for help & hints,
Thomas
2016 Apr 21
2
what does firefox have against sans-serif
I've been struggling to get Firefox to render text in a sans-serif font.
So far, I've only been able to do that by
setting the default font as sans-serif.
DejaVu Sans Mono and DajaVu Sans are the only other
listed fonts that I'm reasonalbly sure are sans-serif.
Helvetica and Arial are not there.
sans-serif does work on Konqueror.
Does anyone know how to affect the font-family on