similar to: save an object of class "im"

Displaying 20 results from an estimated 7000 matches similar to: "save an object of class "im""

2008 Dec 09
3
Selecting rows that are the same in separate data frames
I want to compare two matrices or data frames and select or get an index for those rows which are the same in both. I have tried the following : a = matrix ( 1:10, ncol = 2 ) a b = matrix ( c ( 2,3,4,7,8,9 ), ncol = 2 ) b a[a==b] a = as.data.frame ( matrix ( 1:10, ncol = 2 ) ) a b = as.data.frame ( matrix ( c ( 2,3,4,7,8,9 ), ncol = 2 ) ) b a[a==b] Any ideas please.
2008 Apr 25
4
Equivalent of Excel pivot tables in R
Can somebody tell me how to do the equivalent of a pivot table in R ? For example, if I have : var1 var2 var3 a x 10 b y 20 a z 10 b z 20 a z 10 b z 20 I could have : x y z a 1 0 2 b 0 1 2 where entries in the table are counts of var3.
2008 May 02
2
expand.grid using a repeated vector as a parameter
Hello. I'm trying to do this (not necessarily 0:1) : expand.grid ( 0:1, 0:1, 0:1, 0:1, 0:1) etc..etc. but I want to have control over how many 0:1 are included. Any ideas please ? Thankyou. Simon Parker Imperial College --------------------------------- A Smarter Email. [[alternative HTML version deleted]]
2009 Jan 13
2
Re ad a text file from a directory in which an R script finds itself
Is it possible for an R script to read a text file, say, from the directory in which the script is located ? I don't think I can use setwd(), because I can't specify the directory. -- View this message in context: http://www.nabble.com/Read-a-text-file-from-a-directory-in-which-an-R-script-finds-itself-tp21434236p21434236.html Sent from the R help mailing list archive at Nabble.com.
2008 Feb 07
1
How do you refer to the row above in a data frame ?
You have a two-dimensional data frame. Columns is easy, say col4 <- col3 - col2 How do you do row3 <- row2 +1 for example. -- View this message in context: http://www.nabble.com/How-do-you-refer-to-the-row-above-in-a-data-frame---tp15336933p15336933.html Sent from the R help mailing list archive at Nabble.com.
2008 Nov 29
2
Using grep() to subset lines of text
I have two vectors, a and b. b is a text file. I want to find in b those elements of a which occur at the beginning of the line in b. I have the following code, but it only returns a value for the first value in a, but I want both. Any ideas please. a = c(2,3) b = NULL b[1] = "aaa 2 aaa" b[2] = "2 aaa" b[3] = "3 aaa" b[4] = "aaa 3 aaa"
2008 Jan 16
3
using an element of an array as a new object
I have an array called filesBox. I want to take each element of the first column and assign a dataset to it. For example : filesBox[4,1] returns [1] "fileR" Then I want to assign "fileR" which exists as a text file to the R object "fileR" like this : filesBox[4,1] <- read.table(paste(dir2, filesBox[4,1], sep=""), header = FALSE) But this doesn't
2010 Nov 22
3
save a regression model that can be used later
Hi everyone I have a question about how to save a regression model in R and how to retrieve it for making predictions in a new session. To be more specific, I fitted a multilevel logistic regression model using the lmer from the "lme4" package. I then successfully make predictions using fitted(mymodel). Since data are complex (three levels, nested, numerous categorical and
2010 Feb 11
1
Sweve/cacheSweave
Hi there I have a problem with using Sweave in combination with the option driver = cacheSweave. Whichever code I try to run - when it comes to converting the tex file into pdf it comes up with the same errors (\csname \endcsname errors). Does anybody have an idea what it going wrong? > Sweave("pgfSweave-example.Rnw",driver = cacheSweaveDriver) Writing to file
2011 Sep 01
4
readBin fails to read large files
Posting for a friend Begin forwarded message: From: "Geier, Florian" <florian.geier08@imperial.ac.uk<mailto:florian.geier08@imperial.ac.uk>> Subject: Fwd: readBin fails to read large files Date: September 1, 2011 4:10:53 PM GMT+01:00 To: Begin forwarded message: Date: 1 September 2011 16:01:45 GMT+01:00 Subject: readBin fails to read large files Dear all, I am trying
2016 Apr 27
3
Create a new variable and concatenation inside a "for" loop
Hello, Suppose the you need a loop to create a new variable , i.e., you are not reading data from outside the loop. This is a simple example in Matlab code, for i=1:5 r1=randn r2=randn r=[r1 r2] c(i,:)=r; % creation of each row of c , % the ":" symbol indicates all columns. In R this would be [i,] end The output of interest is c which I'm creating inside the "for" loop
2016 Apr 27
0
Create a new variable and concatenation inside a "for" loop
"c" an extremely commonly-used function. Functions are first-class objects that occupy the same namespaces that variables do, so they can obscure each other. In short, don't use variables called "c" (R is case sensitive, so "C" has no such problem). Wherever possible, avoid incremental concatenation like the plague. If you feel you must use it, at least
2016 Apr 27
3
Create a new variable and concatenation inside a "for" loop
... "(R is case sensitive, so "C" has no such problem)." Well, not quite. Try ?C To add to the previous comments, Dr. Gordon appears to need to do her/his homework and spend some time with an R tutorial or two before posting further here. There are many good ones on the web. Some recommendations can be found here: https://www.rstudio.com/online-learning/#R Cheers, Bert
2016 Apr 28
0
Create a new variable and concatenation inside a "for" loop
Maybe I wasn't clear about my query. I'm very familiar with pre-allocation and vectorization and I had already wrote an R code for this problem in this way. My question wasn't about the most efficient way to solve the problem. It was about whether in R it was possible to use the same index used in the loop to create a new variable and store the results in as in the example showed
2008 Feb 18
2
predicting memory usage
Hi All, is there a way of predicting memory usage? I need to build an array of 86000 by 2500 numbers (or I might create a list of 2 by 2500 arrays 43000 long). How much memory should I expect to use/need? Cheers, Fede -- Federico C. F. Calboli Department of Epidemiology and Public Health Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 75941602 Fax +44
2012 Jan 28
3
logical subsetting, indexes and NAs
Dear All, just a quick example: > x = 1:25 > x[12] = NA > x [1] 1 2 3 4 5 6 7 8 9 10 11 NA 13 14 15 16 17 18 19 20 21 22 23 24 25 > y = x[x<10] > y [1] 1 2 3 4 5 6 7 8 9 NA Is there any way of NOT getting NA for y = x[x<10]? Similarly > y = x[x<15] > y [1] 1 2 3 4 5 6 7 8 9 10 11 NA 13 14 How do I get rid of the NA (not post
2013 May 02
3
Minimal build of R ...
Hi, I'm trying to cross-compile R to javascript so that it can run in a web-browser. Take as long as you need to stop laughing. So, as I was saying - I want to try and get a build of R running in the browser. [If you're not familiar with it already, you might enjoy looking at emscripten.org. It's a remarkably capable tool for translating LLVM bitcode to javascript. Check out some of
2009 Nov 13
4
R, NIH and FDA
Dear All, I will soon be working with NIH and possibly FDA. Will I be able to use R or will I be forced to use SAS? Cheers, Federico -- Federico C. F. Calboli Department of Epidemiology and Public Health Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 75941602 Fax +44 (0)20 75943193 f.calboli [.a.t] imperial.ac.uk f.calboli [.a.t] gmail.com
2007 Nov 26
4
writing summary() to a text file
Hi All, I would like to output the results of a function into a text file, legible as a such. The function produces a summary quite like: summary(lm(x ~ y + w * z)) [for instance] and I am not clear how to save this summary into a text file 'automagically', because I need to be able to do it in a for() loop. Cheers, Federico -- Federico C. F. Calboli Department of Epidemiology
2019 Jan 20
2
Still hitting odd problems trying to install R 3.5.2 on Debian amd64 machine
My Emails a week or so back were about installing Rstudio and the R shiny server on Debian. I was using an old Toshiba laptop as a sandbox for that and it would only install i386 (same for Ubuntu). Using the information at https://cran.r-project.org/bin/linux/debian/ I did get to the point where I had R 3.5.2, Rstudio and the server on there (with some help from Dirk that is in the list archives).