similar to: smoothing a matrix (interpolate in plane)

Displaying 20 results from an estimated 1000 matches similar to: "smoothing a matrix (interpolate in plane)"

2012 Jul 06
4
differences between survival models between STATA and R
Dear Community, I have been using two types of survival programs to analyse a data set. The first one is an R function called aftreg. The second one an STATA function called streg. Both of them include the same analyisis with a weibull distribution. Yet, results are very different. Shouldn't the results be the same? Kind regards, J -- View this message in context:
2009 May 19
5
exists function on list objects gives always a FALSE
Dear R-users, in a minimal example exists() gives FALSE on an object which obviously does exist. How can I check on that list object anyway else, please? > SmoothData <- list(exists=TRUE, span=0.001) > SmoothData $exists [1] TRUE $span [1] 0.001 > exists("SmoothData") TRUE > exists("SmoothData$span") FALSE > exists("SmoothData[[2]]") FALSE
2012 Dec 15
2
troubles reading a text file
Dear R experts, For quite some time I have been trying to solve a mistery of reading a seemingly trouble-free text file. The data is temperature reconstruction arranged as a huge grid, preceded by seven "header lines" (which you see better if file is opened in Firefox or Chrome). This is the data (gridded temperature reconstruction)
2008 Jul 10
4
Turn any vector
Dear R-users, I'd like to turn a vector so it starts with it's end. For better understanding, this set of commands will do what I need: i <- seq(1:10) i_turned <- i for (j in 1:length(i)) i_turned[j] <- i[length(i)-j+1] now, i_turned is what I call turned. Is there a function which would make a script lighter? Thank you upfront for any hint. Best regards, Zroutik
2008 Aug 11
4
A comprehensive manual on "How to plot" (a lot of graphical examples welcome)
Hi, I'm looking for a manual (we based or pdf) which would explain in detail with graphical examples what all the option can do in plot and par. Does anybody now anything like this? A couple of manuals to R I went through do have plot parameters mentioned, but sometimes it is hard to understand or imagine what the parameter can do (the same with the related help page) e.g. I met "From
2009 Feb 12
3
trunc/floor a number -- strange bahaviour
Hi everybody, given a fresh rgui.exe load on winxp OS, I enter (a minimal exaple) n <- 12.357531 Then the following command: n <- (n - floor(n))*10; n gives the following outputs: [1] 3.57531 [1] 5.7531 [1] 7.531 [1] 5.31 [1] 3.1 [1] 1 === still as expected [1] 10 === not expected, count with me: 1 - floor(1) is zero, times 10 gives 0, not 10!!!! [1] 10 === should
2008 Aug 11
1
line with of the symbols in the legend -- changable?
Dear R users, I plot data with points(my_data[x]~x, col = x, type = "o", lwd="4") where x is an integer running from 1 to 10, I get points drawn at the plot. When want to do a legend to this I try legend(leg.txt[x], col = x, text.col = 1, pch = 1, bty = "n") where leg.txt contains the names of the variable and x behaves the same. The difference between the
2018 Mar 12
1
Help on Aggregation
Dear All, 1.I have been trying to aggregate my data but I have not been getting it correctly. In the data I want to convert hourly data into daily averages. Here is a sample of the data: Neph_no Date Time Temp_C Pressure_kPa RH 9 2014/03/28 10:00:00 38.4 95.9 29.7 9 2014/03/28 11:00:00 37.8 95.8 29.2 9 2014/03/28 12:00:00 36.7 95.8 35.1 9 2014/03/28 13:00:00 35.4 95.8 38.9 9
2011 Jun 19
1
Skyline plots from several trees in newick format
Dear all, I am trying to create a consensus skyline plot using the "ape" package(newbie). I have a nexus file that looks like the one from above containing many trees. (my_file.trees) #NEXUS begin trees; [Treefile generated by sim_coal.exe (Laurent Excoffier)] tree true_tree_1 = [&U] (((13.1:6, 43.1:5):12, 28.1:14):284, (((((21.1:0, (20.1:1, 4.1:0):0):1, ((37.1:0,
2010 Apr 27
5
get means of elements of 5 matrices in a list
I've got a list of 5 matrices that are each 5 x 6. I'd like to end up with a 5 x 6 matrix that contains the mean value of the 5 original matrices. I can do this by brute force, but there must be a better way than making each matrix into a vector and then remaking a matrix thanks very much for any help david freedman ll=list(structure(c(9.7, 17.6, 20.8, 24.1, 33.8, 14.5, 25.7, 29.8,
2008 May 23
2
Fit a sine to data
Dear R-users, I'd like to fit a sine function to my data. The result should have a format (and thus the formula, too) y ~ a + sin(x+b) where y and x are vectors, and a and b are (yet) unknown values. The data sets (vectors x and y) are OK, and I can do a simple lm fitting lm(y~x), or lm(y~I(sin(2*pi*x/360))), succesfully My issue is that I'm not able to do the optional linear shift in
2012 Feb 13
1
multi-regression with more than 50 independent variables
Hi R Users, I am going to run a multiple linear regression with around 57 independent variables. Each time I run the model with just 11 variables, the results are reasonable. With increasing the number of independent variables more than 11, the coefficients will get ?NA? in the output. Is there any limitation for the number of independent variables in multiple linear regressions in R? I attached
2011 Jul 26
2
R 2.13.1 for Windows: error when loading (some) packages
I am using the latest version of R 2.13.1 and need to load the following packages; library(maps) library(mapdata) library(mapproj) library(lattice) library(tgp) library(spatstat) library(akima) I get the follwing error when loading the packages, "maps", "mapdata" and "mapproj" Error: package 'maps' is not installed for 'arch=i386' Error: package
2008 Jul 14
1
creating axis of the plot before data are plotted
Dear R-users, I'm tackling with a problem which causing me a head-ache for a long time. I would like to create a nice x-axis to my plots, but I do not know how to implement the method. Imagine a matrix where you have rownames real numbers -- these rownames should be written in the x-axis nicely. I could not find any way how. I'll describe what I'm doing now: I have a matrix where
2008 Aug 14
1
the name of the current running script.r
Dear R users, is there a hack how to get the filename of the current script.r sourced/ran? My issue: I have a couple of scripts which were optimised and are placed in tens of directories. (I have a height.r script in 30 directories, a lines.r script in 25 directories and another flow.r script in 54 directories, growing). The script runs in the directory and does its job: sources data and creates
2015 May 14
3
comportamiento de data.table al hacer calculos por grupos
Estimada comunidad tengo un problema del que no encuentro datos que me ayuden mucho en la web. Estoy haciendo calculos por grupos con data,table. Tengo un archivo (zp.res) con tres columnas que clasifican los datos (sol, con, dia) y una columna de datos numericos (media), de la siguiente forma: sol con dia media 1: con 0 1 -22.6 2: con 0 1 -36.6 3: con 0 1 -35.6 y
2011 Jun 21
1
plot error bars on skyline plot
Hi, I have generated a skyline plot of a tree in newick format using "ape". How can I plot the error bars for this graph? I only have the the tree data. un<-"((((8.1:0, 20.1:0):0, 6.1:3):123, (((((35.1:0, (22.1:0, (43.1:1, 29.1:0):0):0):4, 25.1:6):0, ((42.1:0, 21.1:0):3, (39.1:0, 2.1:0):3):1):8, (3.1:0, 7.1:0):8):48, (((((15.1:0, 14.1:0):0, 11.1:0):0, 37.1:0):0,
2010 Nov 02
2
get the scripname within the executed myscript.r
Dear R-users! Is there a way to obtain the name of the executed myscript.r, i.e. when cmd> rscript myscript.r is executed? (The name of the script in this case is "myscript.r") Here is the explanation of why I would like to get that: Why: I have prepared a set of scripts (decompose_data.r, plot_with_higher_resolution.r, plot_3D.r, etc.) placed in a root directory at one place. I
2008 Jun 17
2
Reshape or Stack? (To produce output as columns)
Dear all, I have used 'read.table' to create a data frame of 720 columns and 360 rows (and assigned this to 'Jan'). The row and column names are numeric: > columnnames <- sprintf("%.2f", seq(from = -179.75, to = 179.75, length = 720)). > rnames <- sprintf("%.2f", seq(from = -89.75, to = 89.75, length = 360)) > colnames(Jan) <- columnnames
2013 Jul 18
1
Bland Altman summary stats for all column combinations
Hello, I have the following data.frame structure(list(Study = structure(c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L,