[R] export the patch results landscapemetrics

2019-09-09 Thread Jon Hak
.  the show_patches() is what I would like to export out to a new raster to display/use the patch results in a GIS. Show_pataches() creates a  Gabriel graph, but I want a raster similar to STMTools or regiongroup (ArcGIS). Thanks for any help, Jon __

Re: [R] error serialize (foreach)

2016-12-05 Thread Jon Skoien
ats, fun = function(x) lapply(x, f1))) system.time(res <- lapply(dats, FUN = function(x) lapply(x, f1))) system.time(res <- clusterApply(cl, dats, fun = function(x) lapply(x, f2))) system.time(res <- lapply(dats, FUN = function(x) lapply(x, f2))) lapply is still faster for the example wi

Re: [R] The code itself disappears after starting to execute the for loop

2016-11-24 Thread Jon Skoien
blem could be? I have seen this in some versions of R, and could also reproduce on a freshly installed 3.3.2. Best wishes, Jon R version 3.3.2 (2016-10-31) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 8.1 x64 (build 9600) locale: [1] LC_COLLATE=English_United Sta

Re: [R] about netcdf files

2016-07-27 Thread Jon Skoien
Hi Lily, You can ignore the first three lines, they are just for information. Which version of raster do you have? I see that the attempt to read the crs-variable was not wrapped in a try-call in earlier versions. Upgrading might help. Best, Jon On 7/27/2016 5:13 PM, lily li wrote: > Hi

Re: [R] about netcdf files

2016-07-27 Thread Jon Skoien
this helps you a bit further. Jon On 7/26/2016 9:07 PM, lily li wrote: > Thanks for your reply. But it says "Error in (function (classes, fdef, > mtable)): > unable to find an inherited method for function 'brick' for signature > 'ncdf4' " > >

Re: [R] about netcdf files

2016-07-26 Thread Jon Skoien
You could try with the brick function from the raster package. bvar = brick(netcdfName) This uses the ncdf4 functions for opening and reading the netcdf, but makes it easier to extract data for each day: p1 = rasterToPoints(bvar[[1]]) and write p1 to csv. Best, Jon On 7/26/2016 6:54 AM

[R] reproducing Graphpad IC50 in R with drc package

2015-09-23 Thread Jon Arsenault
I've been banging my head against the wall a bit with this and would be ecstatic if someone could help. Initial data: Response Dose 1 285.17 0.125 2 377.65 0.250 3 438.99 0.500 4 338.46 1.000 5 227.87 2.000 6 165.96 0.010 7 302.92 0.125 8 418.50

[R] setTxtProgressBar clearing console (Windows RGui)

2015-09-16 Thread Jon Skoien
one to prevent it? Is it reproducible, or something that only bothers me? Thanks, Jon BTW: > sessionInfo() R version 3.2.2 (2015-08-14) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 8 x64 (build 9200) locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=Engli

Re: [R] Reformatting text inside a data frame

2015-09-07 Thread Jon BR
Hi John, Thanks for the reply; I'm pasting here the output from dput, with a 'df <-' added in front: df <- structure(list(rowNum = c(1, 2, 3), first = structure(c(NA, 1L, 2L), .Label = c("AD=2;BA=8", "AD=9;BA=1"), class = "factor"), second = structure(c(2L, 1L, NA), .Label = c("AD=1;BA=2"

[R] Reformatting text inside a data frame

2015-09-07 Thread Jon BR
Hi all, I've read in a large data frame that has formatting similar to the one in the small example below: df <- data.frame(c(1,2,3),c(NA,"AD=2;BA=8","AD=9;BA=1"),c("AD=13;BA=49","AD=1;BA=2",NA)); names(df) <- c("rowNum","first","second") > df rowNum first second 1 1 AD=

[R] data frame formatting

2015-08-18 Thread Jon BR
Hello all, I would like to take a data frame such as the following one: > df <- data.frame(id=c("A","A","B","B"),first=c("BX",NA,NA,"LF"),second=c(NA,"TD","BZ",NA),third=c(NA,NA,"RB","BT"),fourth=c("LG","QR",NA,NA)) > df id first second third fourth 1 ABX LG 2 A TD

Re: [R] R parallel / foreach - aggregation of results

2015-07-31 Thread Jon Skoien
putting it in a clusterExport-call after creating the cluster. Best wishes, Jon On 7/31/2015 2:39 PM, Martin Spindler wrote: Dear all, when I am running the code attached below, it seems that no results are returned, only the predefined NAs. What mistake do I make? Any comments and help is

Re: [R] dplyr help

2015-07-29 Thread Jon BR
David, I do appreciate your help, if not the dose of contempt. I hope you feel OK. Thanks for the tips, -Jonathan On Wed, Jul 29, 2015 at 11:14 PM, David Winsemius wrote: > > On Jul 29, 2015, at 7:37 PM, Jon BR wrote: > > > Hello, > >I've recently discovered

Re: [R] dplyr help

2015-07-29 Thread Jon BR
gt; select(name, drink, cost, sex) > > The last select statement puts the output in the column order you wanted > in your result. > > I hope this helps. > > Brian > > > > On Wed, Jul 29, 2015 at 9:37 PM, Jon BR wrote: > >> Hello, >> I've r

[R] dplyr help

2015-07-29 Thread Jon BR
Hello, I've recently discovered the helpful dplyr package. I'm using the 'aggregate' function as such: bevs <- data.frame(cbind(name = c("Bill", "Mary"), drink = c("coffee", "tea", "cocoa", "water"), cost = seq(1:8), sex = c("male","female"))); bevs$cost <- seq(1:8) > bevs name drink cos

Re: [R] sampling rows with values never sampled before

2015-06-23 Thread Jon Skoien
w this scales if you have a really big data, and whether you could get some FAQ 7.31 problems depending on how you fill your data.frame. Cheers, Jon On 6/23/2015 12:13 AM, C W wrote: Hi Jean, Thanks! Daniel, Yes, you are absolutely right. I want sampled vectors to be as different as possible. I

Re: [R] reshape a data frame

2015-06-03 Thread Jon BR
304.02 7 A_1 A bc2 319.79 8 A_2 A bc2 186.84 9 A_3 A bc2 125.80 10 A_4 A bc294.87 11 B_1 B bc2 1008.19 12 B_2 B bc2 314.02 Thanks. On Wed, Jun 3, 2015 at 5:44 PM, Jon BR wrote: > Hello, > > I would like to ask for so

[R] reshape a data frame

2015-06-03 Thread Jon BR
Hello, I would like to ask for some advice in reformatting a data frame such as the following one: gIN <- c("A_1","A_2","A_3","A_4","B_1","B_2") bc1 <- c(1219.79, 1486.84, 1255.80, 941.87, 588.19, 304.02) bc2 <- c(319.79, 186.84, 125.80, 94.87, 1008.19, 314.02) group <- c("A","A","A","A","B","B"

[R] Basic data frame manipulation

2015-02-23 Thread Jon BR
Hi R-help, Although I know that variations of this question are frequently asked, I searched and haven't found an answer for this specific variant, and wonder if any of you know this off the top of your head: df1 <- data.frame(a = 1:5, row.names = letters[1:5]) # letters a to

Re: [R] How to download and unzip data in a loop

2015-02-05 Thread Jon Skoien
t not work too well. Jon On 2/5/2015 11:30 AM, jim holtman wrote: try taking the quotes off of 'files' Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it. On Wed, Feb 4, 2015 at 5:24 PM, Alexandra Cate

[R] [R-pkgs] Package "ore": Oniguruma Regular Expressions

2015-01-09 Thread Jon Clayden
ock Holmes. It can be obtained and run via <https://github.com/jonclayden/regex-performance>. Sample output is available at <http://rpubs.com/jonclayden/regex-performance>. Contributions to the package or the benchmark are very welcome. All the best, Jon _

Re: [R] StackRaster problem

2014-08-26 Thread Jon Skoien
-function defined in the raster-package. If this is not the case, please give the output from sessionInfo(). Cheers, Jon On 8/26/2014 3:21 PM, Guilherme Leite wrote: Hi, This is the process I want to do: files <- list.files(path=paste(system.file(package="dismo"), '/ex',

[R] Help on installing "R" packages in a Citrix

2014-08-22 Thread Jon-Paul Cameron
ntation or help on this matter. I already sent this request to "R-packages" for help, but was told this was the correct Forum for info of this type. Many thanks Jon-Paul Cameron Systems Support Manager Jon-Paul Cameron Systems Support Manager Direct tel: + 44 (0)20 768

Re: [R] ordinary kriging: the edges of the polygons are ignored

2014-08-21 Thread Jon Skoien
thods from the r-sig-geo list. Best wishes, Jon On 8/20/2014 11:01 PM, Federico Calboli wrote: > Hi All, > > I am trying to do some kriging of a floor, based on a number of heat sensors. > > My data looks like this: > > sensortempxy > 1 1

Re: [R] Copulas and spatial modeling

2014-07-30 Thread Jon Skoien
t spatial modelling on the r-sig-geo mailinglist. Best wishes, Jon On 7/29/2014 5:24 PM, Dave Leighton wrote: > We are interested in using copulas for spatial modeling of environmental > data. We are new to R and new to copulas. We’re looking for some guidance > on how to use copul

[R] R Help

2014-03-10 Thread Jon Nash
I have just installed R 3.0.3 on Windows 7. I open up the GUI and type setwd("c:/users/jon") and press return. Nothing happens, Ive tried manuals, forums etc ... An ex-student needs help using this program. I spent 7 years as an IT consultant before becoming a maths teacher so Im b

Re: [R] To map population of European countries from Eurostat

2014-02-07 Thread Jon Olav Skoien
Michel, I am no expert on ggplot2 and cannot explain why, but it seems the NAs in map.df.l$value cause some problems. Try to remove them before plotting or examine your code to figure out why you get them. They seem to be on the borders between NUTS2-level objects. Best wishes, Jon On 06

[R] ggplot2 beginner question

2013-11-06 Thread Jon BR
Hello, I'm having fun exploring the pretty graphing options in R, although I'm struggling to figure out how to do some simple things; would be thankful if someone could point me toward relevant sections of the manual or provide some starter code to get me going. I'd like to extend what is offer

Re: [R] data frame pointers?

2013-10-24 Thread Jon BR
ot;) #should work > > But, if you wanted to use ?write.table() and also to substitute zeros, > perhaps: > > > res[,2:4] <- lapply(res[,2:4],function(x) {x1 > <-unlist(lapply(x,paste,collapse=","));x1[x1==""] <- 0; x1}) > > > str(res) > #&#x

Re: [R] data frame pointers?

2013-10-23 Thread Jon BR
actors=FALSE) > res <- dcast(df,gene~case,value.var="issue",list) > res > # genecase_1 case_2 case_3 > #1 gene1 nsyn, ampdel > #2 gene2 UTR > > > A.K. > > > On Wednesday, October 23, 2013 7:38 PM, Jon BR > wrote: > H

[R] data frame pointers?

2013-10-23 Thread Jon BR
Hello, I've been running several programs in the unix shell, and it's time to combine results from several different pipelines. I've been writing shell scripts with heavy use of awk and grep to make big text files, but I'm thinking it would be better to have all my data in one big structure in

Re: [R] problem with mahal function Package dismo

2013-08-07 Thread Jon Olav Skoien
combinations of arguments. It was not clear from the post why you want to use a data.frame, so I cannot provide you with a solution to your problem. Maybe you could consider interpolating the variables to the locations in Cfin? Best wishes, Jon On 06-Aug-13 12:50, Ernesto Villarino wrote: Hi all

Re: [R] How to make a raster image in R from my own data set

2013-04-26 Thread Jon Olav Skoien
ng started. Generally you get quicker response to spatial questions from the r-sig-geo list. Jon On 24-Apr-13 16:56, Kristi Glover wrote: Hi R-user, I was trying to make a raster map with WGS84 projection in R, but I could not make it. I found one data set in Google that data is almost the s

Re: [R] snow: cluster initialization

2013-04-18 Thread Jon Olav Skoien
I also wanted to add the result from my Windows machine (R 3.0.0) to the answer below: > ncore = system('nproc') > ncore [1] 127 # My machine was not happy about starting a cluster with 127 nodes though. Best wishes, Jon On 18-Apr-13 15:13, Jon Olav Skoien wrote: I don

Re: [R] snow: cluster initialization

2013-04-18 Thread Jon Olav Skoien
m('nproc') 16 > ncore [1] 0 # the result is printed, not returned Best wishes, Jon On 18-Apr-13 10:52, Kaiyin Zhong (Victor Chung) wrote: Dear all, I found a strange thing with the snow package. This will work: y = matrix(1:4, 2) cl = makeCluster(rep('localhost', 8), typ

Re: [R] Create function from string

2013-04-16 Thread Jon Olav Skoien
Thanks a lot, that seems to do exactly what I need! Best wishes, Jon On 16-Apr-13 10:21, peter dalgaard wrote: Is this what you are looking for? FUN = eval(bquote(function(x) .(parse(text = fstring)[[1]]))) FUN function (x) x + 2 FUN(3) [1] 5 On Apr 16, 2013, at 09:50 , Jon Olav Skoien

[R] Create function from string

2013-04-16 Thread Jon Olav Skoien
substitute correctly, or to completely avoid the eval(parse())? Thanks, Jon -- Jon Olav Skøien Joint Research Centre - European Commission Institute for Environment and Sustainability (IES) Land Resource Management Unit Via Fermi 2749, TP 440, I-21027 Ispra (VA), ITALY jon.sko...@jrc.ec.e

Re: [R] help with kriging interpolation

2013-04-04 Thread Jon Olav Skoien
done automatically. If this doesnt work out, you have to describe better what you are looking for. You will usually get more answers to questions about geostatistics on the r-sig-geo mailinglist. Cheers, Jon On 04-Apr-13 7:09, Alfred Oswago wrote: All, I am new to using R and know some

Re: [R] Cokriging

2013-03-19 Thread Jon Olav Skoien
-long). Best wishes, Jon BTW, you are more likely to get quicker response to questions like this on the mailinglist r-sig-geo. On 19-Mar-13 2:03, Gnai Nishani Musafer wrote: Dear All, I run following code to estimate the blocks using cokriging ( my data set has more than 50,000 data points

Re: [R] Netcdf file in R

2013-02-22 Thread Jon Olav Skoien
I would also suggest the package raster, which usually make it much easier to extract spatial NetCDF-data than direct use of the NetCDF-packages. Bests, Jon On 22-Feb-13 17:14, Marc Schwartz wrote: NetCDF is a binary file format and will be stripped by the list server filters. Don't b

Re: [R] How to make Ordinary Kriging using gstat predict?

2012-12-19 Thread Jon Olav Skoien
example in ?predict.gstat: g <- gstat(id="tec", formula=TEC ~ 1, data=data, model = v.fit) Cheers, Jon BTW, you will generally get quicker response to questions regarding any kind of spatial data handling from the mailinglist r-sig-...@r-project.org. On 17-Dec-12 18:58, DIMITRIS KAR

Re: [R] Rprof causing R to crash

2012-12-14 Thread Jon Olav Skoien
loops after a call to Rprof() on one of our Linux servers (R 2.14.0) without any problems. Jon On 12-Dec-12 17:06, Uwe Ligges wrote: On 12.12.2012 00:05, Marian Talbert wrote: I'm trying to use Rprof() to identify bottlenecks and speed up a particullary slow section of code which reads

Re: [R] loading both RPostgreSQL and RSQLite leads to problems

2012-11-08 Thread Jon McAuliffe
method for function show for signature "PostgreSQLDriver" are you able run this successfully in 2.15.2? thanks jon. On Aug 23, 2012, at 12:38 PM, Martin Morgan wrote: > On 08/22/2012 01:35 PM, Jon McAuliffe wrote: >> hello, >> >> if i load the RSQLite pa

Re: [R] Mirror of the R manuals with a new visual style

2012-10-23 Thread Jon Clayden
Hi Barry, On 23 October 2012 14:00, Barry Rowlingson wrote: > On Tue, Oct 23, 2012 at 12:37 PM, Jon Clayden wrote: >> Dear all, >> >> I've created a new mirror of the HTML versions of the main R manuals >> at <http://r-manuals.flakery.org>. This mirror

[R] Mirror of the R manuals with a new visual style

2012-10-23 Thread Jon Clayden
be updated after each release of R. The code used to generate these versions is freely available at <https://github.com/jonclayden/r-manuals>. I hope some people find this useful. Comments are welcome. All the best, Jon __ R-help@r-project.org m

Re: [R] Create a function to number each repeated visit or measurements

2012-09-04 Thread Jon Toledo
, 7, 8, 9 > #5 e 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 > A.K. > > > > - Original Message - > From: PIKAL Petr > To: Jon Toledo ; "r-help@r-project.org" > > Cc: > Sent: Tuesday, September 4, 2012 7:07 AM > Subject

[R] Create a function to number each repeated visit or measurements

2012-09-03 Thread Jon Toledo
Hi dear R list members, I am trying to create a numerical variable that tracks the visits/entries that a subject has had. For example having a database of repeated serial measurements that are ordered by subject and time. So I would get a variable that says 0 for baseline visit/measurement, 1 f

[R] loading both RPostgreSQL and RSQLite leads to problems

2012-08-22 Thread Jon McAuliffe
ostgreSQL loaded, RSQLite loaded (in that order). i'd be grateful for any help resolving or working around this issue. if possible, please include my email address in any reply. best jon mcauliffe j...@mcauliffe.com (1) > showMethods('show') Function: show (package met

Re: [R] interpolation to new points between geo coordinates

2012-07-02 Thread Jon Olav Skoien
interpolation of lat-lon data, consider using spTransform to get projected coordinates if you use any of the geostatistical methods. You will for spatial questions generally get quicker response from the r-sig-geo mailinglist. Best wishes, Jon On 02-Jul-12 10:47, Jan Näs wrote: Hi I have a data

Re: [R] subset columns from list with variable substitution

2012-05-26 Thread Jon Ween, MD
lp, really appreciated. Best Jon On 2012-05-25, at 1:43 PM, MacQueen, Don wrote: > The select argument to subset() is supposed to name the columns you want > to keep. > So is the syntax I gave, table[,list1], and it is the correct way when > list1 is a character vector (which it is). >

[R] [R-pkgs] New package for morphology and smoothing in any number of dimensions: mmand

2012-04-30 Thread Jon Clayden
g(x,k)) user system elapsed 3.267 0.018 3.287 A single closing (dilate followed by erode) operation therefore takes around 1/30th of a second in this case. I hope that this contribution will be useful. All the best, Jon ___

[R] Remove top/right border from lattice plots

2012-04-24 Thread Jon Zadra
ll removes all 4 borders: / par.settings = list(axis.line = list(col = 0))/ xyplot( Sepal.Length ~ Petal.Length, auto.key=T, data=iris, par.settings = list(axis.line = list(col = 0))) Thanks in advance, - Jon / / -- Jon Zadra Department of Psychology University of Virginia P.O. Box 400400

[R] [R-pkgs] Significant updates to medical imaging packages: TractoR and RNiftyReg

2012-04-12 Thread Jon Clayden
s a flexible command-line interface which can be used to perform common tasks quickly. Details can be found in a recent JSS paper on TractoR [4]. All the best, Jon [1] http://sourceforge.net/projects/niftyreg/ [2] https://github.com/jonclayden/RNiftyReg [3] http://www.tractor-mri.org.uk [

Re: [R] Cannot change location of tempdir()

2012-03-08 Thread Jon Olav Skoien
On 08-Mar-12 12:45, Prof Brian Ripley wrote: > On Thu, 8 Mar 2012, Jon Olav Skoien wrote: > >> Hi, >> >> One of the functions I use needs to write to a temporary file, in the >> directory given by tempdir(). I want to change this from the standard >> one, as

[R] Cannot change location of tempdir()

2012-03-08 Thread Jon Olav Skoien
I know this is not the last version, but I do not have administrator rights myself on the computer and did not see any relevant references to tempfile() in the news for newer versions. Thanks, Jon -- Jon Olav Skøien Joint Research Centre - European Commission Institute for Environment and S

[R] How to apply two parameter function in data frame

2012-03-06 Thread jon waterhouse
ply, rather than lapply that I want Thanks, Jon -- View this message in context: http://r.789695.n4.nabble.com/How-to-apply-two-parameter-function-in-data-frame-tp4451211p4451211.html Sent from the R help mailing list archive at Nabble.com. __ R-he

Re: [R] Spacing of text does not match spacing of bars in barplot

2012-03-05 Thread Waterhouse, Jon D.
Thanks guys. I figured R would have an elegant and simple solution. I spent a bunch of (fruitless) time going down the par(mar) and par("usr") road, so I thought it was time to ask. Jon -Original Message- From: Marc Schwartz [mailto:marc_schwa...@me.com] Sent: Friday, March

[R] Spacing of text does not match spacing of bars in barplot

2012-03-02 Thread jon waterhouse
;Less than $5000/year", "$5K to $10K" , "$10K to $15K" , "$ 15K to $20K" , "$20K to $25K" , "$25K to $30K" , "Over $30K" ) barplot(X2sum) text(1:8, par("usr")[3] - 0.5, srt = 45, adj = 1, labels

[R] barplots of several variables with different number of categories

2012-03-01 Thread jon waterhouse
here's a simple solution? Thanks, Jon -- View this message in context: http://r.789695.n4.nabble.com/barplots-of-several-variables-with-different-number-of-categories-tp4435092p4435092.html Sent from the R help mailing list archive at Nabble.com. ___

[R] Suggests/Enhances or .onLoad for S3-methods for optional package

2012-02-13 Thread Jon Olav Skoien
ck is happier, but I cannot load the package after installing. I have read about the use of "Suggest", "Enhances" etc in "Writing R Extensions", but could not figure out the right way to do this. I am sure there is something I am missing here. Thanks, Jon -

Re: [R] Raster manipulation in R

2011-12-01 Thread jon . skoien
r-sig-geo. Cheers, Jon On 01-Dec-11 14:27, Jean V Adams wrote: jjcabrera20 wrote on 12/01/2011 04:02:47 AM: Hello everyone in the forum For introducing myself I would say I have a basic knowledge of R. Now I am intended to implement a flood algorithm using R. I have some MatLab experience doing the

Re: [R] Spatial Statistics using R

2011-11-17 Thread jon . skoien
se in Landau interesting: http://www.archive.org/search.php?query=GEOSTAT%20Landau Cheers, Jon On 17-Nov-11 7:28, vioravis wrote: I am looking for online courses to learn Spatial Statistics using R. Statistics.com is offering an online course in December on the same topic but that schedule doesn&#

[R] plot separate groups with plotmeans()

2011-11-08 Thread Jon Zadra
rouping argument listed. Any help is appreciated, including pointing to a more robust function for plotting means. Thanks, Jon -- Jon Zadra Department of Psychology University of Virginia P.O. Box 400400 Charlottesville VA 22904 (434) 982-4744 email: za...@virginia.edu <http://www.google.

Re: [R] getting data associated with coordinates in a spatial data frame

2011-10-14 Thread jon . skoien
) To avoid numerical problems, you can also find the data of the location closest to the point you are interested in: meuse.grid@data[which.min(spDistsN1(meuse.grid, c(181100, 333660))),] = factor(c(1,1,1,1,1)) For questions about spatial data you can also use the mailing-list r-sig-geo. Che

[R] Problems with aggregate() function in stats package

2011-09-15 Thread Jon Zadra
gregate(x=DistRatio, by=list(Condition), FUN=mean)) Group.1x 1 Congruent 1.700215 2 Mismatch 1.859795 So, am I doing something wrong or is this function just not working as advertised? Thanks, Jon -- Jon Zadra Department of Psychology University of Virginia P.O. Box 400400

[R] Non compatible arguments in gvlma

2011-09-14 Thread Jon Toledo
2.0-11 foreign_0.8-44 survival_2.36-9 [11] nnet_7.3-1 MASS_7.3-13 loaded via a namespace (and not attached):[1] cluster_1.14.0 grid_2.13.1 lattice_0.19-30 tools_2.13.1 Thank you ver much Jon Toledo PostDoctoral Research FellowCNDR, UPenn Medical

Re: [R] Trying to extract probabilities in CARET (caret) package with a glmStepAIC model

2011-08-28 Thread Jon Toledo
I corrected some of my syntax and changed the the glmStepAIC for glm and ti worked. I tried my command lines with the mdrr dataset (after doing the first cleaning steps as referred in the manual), the only difference is that I only took first two columns because it took too much time with one v

[R] Trying to extract probabilities in CARET (caret) package with a glmStepAIC model

2011-08-27 Thread Jon Toledo
l(method = "cv", number = 10, classProbs = TRUE,returnResamp = "all", verboseIter = FALSE) glmFit <- train(Descr, Categ, method = "glmStepAIC",tuneLength = 4,trControl = fitControl) Thank you. Best regards, Jon Toledo, MD Postdoctoral fellow University of Penn

Re: [R] Predictions from a logistic regression model with validation for ROCR

2011-08-26 Thread Jon Toledo
crossvalidated sets. Thank you very much. > CC: r-help@r-project.org > From: dwinsem...@comcast.net > To: tintin...@hotmail.com > Subject: Re: [R] Predictions from a logistic regression model with validation > for ROCR > Date: Fri, 26 Aug 2011 14:35:37 -0400 > > > On Aug 26, 2

[R] Predictions from a logistic regression model with validation for ROCR

2011-08-26 Thread Jon Toledo
to predictors. Thank you. Best regards, Jon Toledo, MD Postdoctoral fellow University of Pennsylvania School of Medicine Center for Neurodegenerative Disease Research 3600 Spruce Street 3rd Floor Maloney Building Philadelphia, Pa 19104

[R] Repating a loop of lm function with different columns of database

2011-07-14 Thread Jon Toledo
V2a V3a V1b V2b V3b TimeDifferenceDays2.42 72.4 3.75 2.46 55.4 4.44 6081.66 89.7 2.54 2.17 94.0 2.15 4192.45 112. 0.46 2.40 129.0 .42 7142.58 55.6 5.05 2.44 135.0 5.39 7212.61 332.0 22.6 3.55 238.0 16.4 729" Data <- read.table(textConnection(txt), header = TRUE) Thank yo

[R] Looking for a repeated measure two groups comparison and a two factor ANOVA in Circular distribution

2011-03-22 Thread Jon Toledo
Hi, I am looking for a way to study some phase data with a circular distribution measured in rad.I would like to do a two way ANOVA (if possible mixed, with inter and intrasubject).I haven´t found a package that does that in R?Does sombeody know if there is one or how to do the analysis.Thanks

Re: [R] Spatial cluster analysis of continous outcome variable

2011-03-18 Thread Jon Toledo
09:48:46 -0400 > > > On Mar 17, 2011, at 10:45 PM, Jon Toledo wrote: > > > I read it but it said PDF file and Ps, didn´t specify which other > > files, so I attached a csv file, which I thought would work. > > The last time I read it, it said .pdf and .txt.

Re: [R] Spatial cluster analysis of continous outcome variable

2011-03-17 Thread Jon Toledo
you did you didn't read it closely enough. > > -- > David. > On Mar 17, 2011, at 4:11 PM, Jon Toledo wrote: > > > > > I attach the data (csv format). There are the 3 coordinates, (but as > > there are not so many points I wanted two do 3 analysis in each o

Re: [R] Spatial cluster analysis of continous outcome variable

2011-03-17 Thread Jon Toledo
I attach the data (csv format). There are the 3 coordinates, (but as there are not so many points I wanted two do 3 analysis in each of them collapsing one variable).There are two variables to study I have posted the data as a ratio between both states and as a percentage state between both sta

[R] Spatial cluster analysis of continous outcome variable

2011-03-17 Thread Jon Toledo
Dear R Users, R Core Team, I have a two dimensional space where I measure a numerical value in two situations at different points. I have measured the change and I would like to test if there are areas in this 2D-space where there is a different amount of change (no change, increase, decrease).

[R] Find downstream values in a network

2011-03-02 Thread Jon Olav Skoien
e that I have missed a better way of propagating the values. This is a preprocessing step before plotting a result in a documentation example, so I am looking for a short, intuitive and nice solution... Any hints? Thanks, Jon __ R-help@r-project.or

[R] Problem on flexmix when trying to apply signature developed in one model to a new sample

2011-03-01 Thread Jon Toledo
Problem on flexmix when trying to apply signature developed in one model to a new sample. Dear R Users, R Core Team, I have a problem when trying to know the classification of the tested cases using two variables with the function of flexmix: After importing the database and creating a

[R] Forced inclusion of varaibles in validate command as well as step

2011-02-25 Thread Jon Kroll Bjerregaard
and not too experienced as a programmer (I am a MD after all) However I am quite impressed with R so far since I have been trying to get this far in STATA for a few weeks. Sincerely Jon Kroll Bjerregaard, MD. Dep of Oncology Odense University Hospital [[alternative HTML vers

Re: [R] Prediction error for Ordinary Kriging

2011-01-07 Thread Jon Olav Skoien
Pearl, You find the prediction error as the var1.var column in your result object, i.e., y in your script. For plotting: spplot(y, 2) or spplot(y,"var1.var") Jon On 1/5/2011 9:28 PM, pearl may dela cruz wrote: Hi ALL, Can you please help me on how to determine the prediction

Re: [R] Cross validation for Ordinary Kriging

2011-01-07 Thread Jon Olav Skoien
On 1/7/2011 12:40 PM, Jon Olav Skoien wrote: Pearl, The error suggests that there is something wrong with x2, and that there is a difference between the row names of the coordinates and the data. If you call str(x2) see if the first element of @coords is different from NULL, as this can

Re: [R] Cross validation for Ordinary Kriging

2011-01-07 Thread Jon Olav Skoien
is, try to figure out why. You can also set the row.names equal to NULL directly: row.names(x...@coords) = NULL although I dont think such manipulation of the slots of an object is usually recommended. Cheers, Jon BTW, you will usually get more response to questions about spatial data

Re: [R] install.packages() - old version deleted, new version did not install

2010-12-20 Thread Jon Olav Skoien
This sounds like a good solution for the case I described in my first email. Thanks a lot! Jon On 12/20/2010 4:05 PM, Duncan Murdoch wrote: On 20/12/2010 9:29 AM, Duncan Murdoch wrote: On 20/12/2010 9:26 AM, Uwe Ligges wrote: > > On 20.12.2010 15:19, Duncan Murdoch wrote: > >

Re: [R] install.packages() - old version deleted, new version did not install

2010-12-20 Thread Jon Olav Skoien
On 12/20/2010 1:30 PM, Uwe Ligges wrote: On 20.12.2010 09:41, Jon Olav Skoien wrote: On 12/17/2010 6:22 PM, Duncan Murdoch wrote: On 17/12/2010 11:13 AM, Jon Olav Skoien wrote: Dear list, (R 2.12.0, Windows 7, 64bit) I recently tried to install a new package ("spacetime"), tha

Re: [R] install.packages() - old version deleted, new version did not install

2010-12-20 Thread Jon Olav Skoien
On 12/20/2010 1:43 PM, Duncan Murdoch wrote: Jon Olav Skoien wrote: On 12/17/2010 6:22 PM, Duncan Murdoch wrote: On 17/12/2010 11:13 AM, Jon Olav Skoien wrote: Dear list, (R 2.12.0, Windows 7, 64bit) I recently tried to install a new package ("spacetime"), that depends on

Re: [R] install.packages() - old version deleted, new version did not install

2010-12-20 Thread Jon Olav Skoien
On 12/17/2010 6:22 PM, Duncan Murdoch wrote: On 17/12/2010 11:13 AM, Jon Olav Skoien wrote: Dear list, (R 2.12.0, Windows 7, 64bit) I recently tried to install a new package ("spacetime"), that depends on "sp" among others. I already had the last one installed, but there

[R] install.packages() - old version deleted, new version did not install

2010-12-17 Thread Jon Olav Skoien
ste(instPath,"/libs/x64/sp.dll", sep = "")) != 0) warning("cannot remove...") before ret <- unlink(instPath, recursive = TRUE) (line 95) x64 in the path would have to be changed to something architecture dependent... Best wishes, Jon __

[R] [R-pkgs] New package for general-purpose global optimisation: "soma"

2010-12-17 Thread Jon Clayden
ding its way onto the mirrors. All the best, Jon -- [1] http://www.ft.utb.cz/people/zelinka/soma/ [2] http://cran.r-project.org/web/packages/DEoptim/index.html [3] http://cran.r-project.org/web/packages/soma/index.html ___ R-packages mailing

[R] Optimal method to scan cells and set flag

2010-12-16 Thread Jon Erik Ween
e" to "L", if Y for "Rxxx" set to "R" and "B" if both. There are >2500 records, so for-loops would be inefficient. Any suggestions? Much obliged. Best Jon Soli Deo Gloria SubjID LesionSide RicaRAtChor RA1 RA2 RM1 RM2 R

Re: [R] set dataframe field value from lookup table

2010-12-09 Thread Jon Erik Ween
is then translated into a z-score in a second table. My DSTz table combines these two steps, going from the raw score to the tabulated age-adjusted z-score that was calculated based on a normative sample by the WMS-R folks. Jon Soli Deo Gloria Jon Erik Ween, MD, MS Scientist, Kunin-Lunenfeld

Re: [R] set dataframe field value from lookup table

2010-12-09 Thread Jon Erik Ween
econd table is the full z-score table (DSTz.txt), age group in first row and score (2*DSF + 2*DSB) in the first column. Jon Soli Deo Gloria SubjID Age DSF DSB 1 45 8 5 2 21 5 3 3 78 5 4 4 35 8 6 5 57 7

Re: [R] set dataframe field value from lookup table

2010-12-09 Thread Jon Erik Ween
object length is not a multiple of shorter object length So, regardless of how you calculate [r,c], the step df$DSTz<-DSTzlook[r,c] doesn't work. I've tried various permutations with "apply", but that didn't work either. Any suggestions? Jon Soli Deo Gloria Jon Eri

Re: [R] set dataframe field value from lookup table

2010-12-09 Thread Jon Erik Ween
But it is the indirect referencing of the lookup in the main table that causes me trouble. Jon Soli Deo Gloria Jon Erik Ween, MD, MS Scientist, Kunin-Lunenfeld Applied Research Unit Director, Stroke Clinic, Brain Health Clinic, Baycrest Centre Assistant Professor, Dept. of Medicine, Div. of Neu

Re: [R] set dataframe field value from lookup table

2010-12-09 Thread Jon Erik Ween
.8 2.6 2.6 27 0.0 0.5 1.0 1.8 2.6 2.6 26 -.5 0.0 0.0 1.0 1.8 2.6 . . . . So, if a subject (row) has age==29 and a standard score of 28, the value should be 1.8, etc. Thanks Jon Soli Deo Gloria Jon Erik Ween, MD, MS Scientist, Kunin-Lunenfeld Applied Research Unit Director, Strok

[R] set dataframe field value from lookup table

2010-12-09 Thread Jon Erik Ween
nded" age value than the nested ifelse's I've used? 2) how to reference the lookup table based on computed indices? Thanks Jon # Define tables DSTzlook <- read.table("/Users/jween/Documents/ResearchProjects/ABC/data/DSTz.txt", header=TRUE, sep="\t", n

[R] change matrix based on look-up value from table

2010-12-08 Thread Jon Erik Ween
ages and raw scores and I need to select the appropriate value from the look-up table. Unfortunately, the distribution of the look-up does not fit a linear model, so I can't compute from a formula. Any suggestions would be appreciated. Thanks Jon -- View this message in context: http://r.7

Re: [R] Filled contour plot showing labeled isolines?

2010-11-24 Thread Jon Tang
e placement of the filled >> contour plot and the contour plot do not align correctly. Any suggestions >> would be appreciated. >> >> Thanks, >> Jon >> >> -- > > David Winsemius, MD > West Hartford, CT > > [[alternative HTML versio

Re: [R] maptools package

2010-11-11 Thread Jon Olav Skoien
rom a map? I have never used subset with shape files, maybe you can try the following? submap <- spb[spb$Name == "Vasilevsky Island",] This usually works if spb is a SpatialPolygonsDataFrame. Cheers, Jon A 2010/11/10 Phil Spector: Aleksandr - What happens when you

[R] Change global env variables from within a function

2010-10-13 Thread Jon Zadra
lace "dframe" with "tempdf" in the evaluation, so it seems to be a problem of looking at some variables within the function environment but others in the parent environment. Any help is greatly appreciated. Thanks, Jon -- Jon Za

Re: [R] name ONLY one column

2010-09-27 Thread Pedersen Jon
Hi, It is because the column names do not exist. If you cast the matrix as a data frame your code would work. jon -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Lorenzo Cattarino Sent: 27. september 2010 10:27 To: r-help@r

  1   2   >