similar to: slope calculation

Displaying 20 results from an estimated 2000 matches similar to: "slope calculation"

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
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 ======================================
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 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.
2008 Apr 05
2
pearson's correlation
Hello, I used the function cor to calculate the pearson correlation coefficient between variables. However, the resulting values do not correspond to the outcome of my excel-calculations, for which I used the formula Cor(x,y)=Cov(x,y)/(SD(x)*SD(y)) So my question is: How does the function "cor" compute the pearson correlation coefficient? Thank you in advance, Ake Nauta
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 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
2011 Sep 19
1
Possible or not possible: serif axis labels with plotmath [but everything else sans serif]?
Dear expeRts, I it possible to have serif labels in the following plot? x <- 1:10 y <- x plot(x, y, type="b", xlab=expression(x[1]), ylab=expression(x[2])) I know that one can use pdf(, family="serif"), but then also the axis tick marks are printed in serif font. Apart from the fact that it may not look nice, I'm just interested if one can have serif axis labels
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
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 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 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
2005 Apr 14
1
Strange behavior of atan2
Dear all, I've got a problem with the function atan2. For a couple of coordinates x and y, This function returns the angle between the vector of coordinates (x, y) and the abscissa axis, i.e. it is the same as atan(y/x) (as indicated on the help page). If we consider the vector with coordinates x = 0 and y = 0, we have the following result: > atan(0/0) [1] NaN This is expected.
2009 Sep 03
1
Output from as.windrose() in oce package baffles me
I'm having trouble understanding the output from as.windrose(). For one thing, data on a boundary between sectors seem to be left out of the counts. I assume that explains the missing point in the output below (angle 45). Shouldn't one side of each sector interval be open, to include values such as my 45 in the example? Also, why does the angle 180 in my input apparently not result in
2013 Mar 05
2
Function completely locks up my computer if the input is too big
Dear r-help, Somewhere in my innocuous function to rotate an object in Cartesian space I've created a monster that completely locks up my computer (requires a hard reset every time). I don't know if this is useful description to anyone - the mouse still responds, but not the keyboard and not windows explorer. The script only does this when the input matrix is large, and so my initial
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 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
2008 Aug 01
1
parent in Creating environment object
Hi, I would like to convert a simple list into an environment object. It seems I have to create an environment object with new.env() and assign the single values afterwards. Now what I did not really understand from the guides until now is, how the parent environment supplied to the new.env() function influence the final environment. So: 1. Do I ALWAYS have to supply a parent during creation? 2.
2013 Jan 27
3
[LLVMdev] SIMD trigonometry/logarithms?
----- Original Message ----- > From: "Dmitry Mikushin" <dmitry at kernelgen.org> > To: "Justin Holewinski" <justin.holewinski at gmail.com> > Cc: "Hal Finkel" <hfinkel at anl.gov>, "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> > Sent: Sunday, January 27, 2013 10:19:42 AM > Subject: Re: [LLVMdev] SIMD