similar to: function return output

Displaying 20 results from an estimated 60000 matches similar to: "function return output"

2012 Sep 21
3
Return level plots
Hello, First of all, let me apologize that my statistics background is modest at best. I am doing some extreme value analysis on model output (WRF) which have the following dimensions: speed(time,lat,lon) I am trying to fit the GPD (gpd.fit) to each point (time,lat,lon) to get a return level plot with values at each grid point. (Map with return level by location.) Here is some code I
2009 Jan 10
2
Print specific matrix value???
Hello All, I'm trying to print specific row and column for Observed_Scores matrix, however, when I execute the command "Observed_Scores[1,1]", I get the message "Error in Observed_Scores[1, 1] : incorrect number of dimensions". Could you please help and let me know where is the mistake? Here is my program: library(ltm) library(psych) # Settting the working directory
2000 Apr 06
1
MetaPost device?
I would like to know if a MetaPost device is available or in the plans. A search MetaPost in the documents and list archives did not turn up anything. [I would prefer to use MetaPost when the graphics is to be included in a document that I want in both hard-copy and in pdf formats.] If not, how easy/hard is it to add a new device to R? I caouln't see anything about adding devices in the
2000 Apr 06
1
MetaPost device?
I would like to know if a MetaPost device is available or in the plans. A search MetaPost in the documents and list archives did not turn up anything. [I would prefer to use MetaPost when the graphics is to be included in a document that I want in both hard-copy and in pdf formats.] If not, how easy/hard is it to add a new device to R? I caouln't see anything about adding devices in the
2004 Nov 01
5
make apply() return a list
Hi, I have a dataframe (say myData) and want to get a list (say myList) that contains a matrix for each row of the dataframe myData. These matrices are calculated based on the corresponding row of myData. Using a for()-loop to do this is very slow. Thus, I tried to use apply(). However, afaik apply() does only return a list if the matrices have different dimensions, while my matrices have
2008 Jan 07
2
R and Clusters
Dear All, I hope I am not asking a FAQ. I am dealing with a problem of graph theory [connected components in a non-directed graph] and I do not want to rediscover the wheel. I saw a large number of R packages dealing for instance with the k-means method or hierarchical clustering for spatially distributed data and I am basically facing a similar problem. I am given a set of data which are the
2011 Dec 12
5
not complete character in csv file
Dear R users, I got the following problem. Given that > data[3,2] [1] "010252" Code: intro <- data.frame() intro[1,1] <- as.character(data[3,2]) write.csv(intro, file='intro.csv') In 'intro.csv' file I am loosing the 0 in frot of 10252, which I need. Is there a way to keep the full character saved? R 2.13.2 (64 bit). Thanks, robert -- View this message in
2006 Jan 26
1
How to make two side-by side trellis plots same size
Dear Latticers, I want to position two trellis plots of different forms side-by-side. The plot types are slightly different, aspect=1 required, but panels should look the same in both plots. Current workaround uses a guessed factor. Any way to improve this? Dieter library(lattice) n1 = 20 # I cannot rbind df1 and df2, because the x-dimensions are # different and must be scaled individually
2017 Jun 20
1
How to write an estimated seasonal ARIMA model from R output?
I'm trying to use the following command. arima (x, order = c(p,d,q), seasonal =list(order=c(P,D,Q), period=s) How can I write an estimated seasonal ARIMA model from the outputs. To be specifically, which sign to use? I know R uses a different signs from S plus. Is it correct that the model is: (1-ar1*B-ar2*B^2-...)(1-sar1*B^s-sar2*B^2s-....)(1-B)^d(1-B^s)^D
2019 Oct 29
5
head.matrix can return 1000s of columns -- limit to n or add new argument?
Hi all, So I've started working on this and I ran into something that I didn't know, namely that for x a multi-dimensional (2+) array, head(x) and tail(x) ignore dimension completely, treat x as an atomic vector, and return an (unclassed) atomic vector: > x = array(100, c(4, 5, 5)) > dim(x) [1] 4 5 5 > head(x, 1) [1] 100 > class(head(x)) [1] "numeric" (For a
2004 Sep 15
1
fractal dimension of an image
Hello, I have a problem that I think can be solved in R but I'm not sure how to tie things together. I have a digital image of a crystal growth in 2 dimensions. And my aim is to calculate the fractal dimension of the crystal. I was planning to use the box counting method. So I need to read in the image in R (for which I can use the pixmap or rimage packages) and then draw a grid over at a
2012 Mar 22
1
Multiple data frames in single csv output
Hi everybody, I have a model that outputs 1) primary analysis results, 2) secondary analysis results and 3) model choice parameters. I would like to output them all together as one "spread sheet" to minimize my "copy paste time" since I need to run the model with at least 20-30 sets of parameters. They are all in different data.frames with different dimensions. However, I have
2011 May 10
3
metaMDS and envfit: Help reading output
Hello R experts, I've used metaMDS to run NMDS on some fish abundance data, and am also working on correlating environmental data to the NMDS coordinates. I'm fairly new to metaMDS and NMDS in general, so I have what are probably some very basic questions. My fish abundance data consists of 66 sites for which up to 20 species of fish were identified and counted. I ran metaMDS on this data
2011 Aug 01
3
General indexing in multidimensional arrays
Dear R community, I have a general question regarding indexing in multidiemensional arrays. Imagine I have a three dimensional array and I only want to extract on vector along a single dimension from it: data <- array(rnorm(64),dim=c(4,4,4)) result <- data[1,1,] If I want to extract more than one of these vectors, it would now really help me to supply a logical matrix of the
2007 Aug 21
1
Output from while and for loop
Hello, I am new and am having a hard time getting the proper syntax for output from loops. I am working on a simulation to generate a null expectation of bee behavior. Pieces of it work. The part that I am having specific difficulty is in output of a vector from within the while loop that I am using. Basically the simulation works as such: I have a starting point and a neighbor matrix and a
2007 May 21
3
an array of matrices
I'd like to have a three dimensional array of matrices. I thought I could construct a five dimensional array to have the three dimensional array of matrices. However, not all of the matrices in the array have the same dimensions, which seems to mean I can't use a five dimensional array. What I'd like is this: A = matrix(1:4,2,2) B = matrix(1:25,5,5) C = matrix(1,3,3) D =
2010 Nov 27
1
return vector of element names for vector, matrix or array
Just as as.vector() takes a vector, matrix or array and returns a vector in row-major order, I'd like to write a function to take such an object and return the dimension names, pasted with some separator, as a similar vector. Here is something ugly cobbled together to demonstrate what I want: a function to work for any number of dimensions. vecnames <- function(x, sep=':') {
2011 Jun 20
2
(no subject)
HELLO, anybody... could you help me to check the below coding for volcano. what is the mistake? what the plot could not display? # volcano_plot.r # # Author: Amsha Nahid, Jairus Bowne, Gerard Murray # Purpose: Produces a volcano plot # # Input: Data matrix as specified in Data-matrix-format.pdf # Output: Plots log2(fold change) vs log10(t-test P-value) # #
2000 May 25
4
Needed: Understading runif() output :-)
Dear all, I have been trying to understand what runif() is telling me. I am generating lots of numbers (billions and billions (wow, I''ve dreamed about saying that for many years... :-) ), for a distribution that has the following quantile function: 1 / (2 * sqrt(1 - p)) (that is, the distribution has a lower cutoff) As you can imagine, this has rather heavy upper tail. I was
2017 Jun 01
5
Reversing one dimension of an array, in a generalized case
Hi All: I have been looking for an elegant way to do the following, but haven't found it, I have never had a good understanding of any of the "apply" functions. A simplified idea is I have an array, say: junk(5, 10, 3) where (5, 10, 3) give the dimension sizes, and I want to reverse the second dimension, so I could do: junk1 <- junk[, rev(seq_len(10), ] but what I am