similar to: A little exercise in R!

Displaying 20 results from an estimated 300 matches similar to: "A little exercise in R!"

2008 Mar 24
1
Cannot allocate large vectors (running out of memory?)
Hi. As shown in the simplified example below, I'm having trouble allocating memory for large vectors, even though it would appear that there is more than enough memory available. That is, even with a memory limit of 1500 MB, R 2.6.1 (Win) will allocate memory for a first vector of 285 MB, but not for a second vector of the same size. Forcing garbage collection does not seem
2012 Feb 17
2
Neighbour List to Matrix
Hi everybody!I'm a new user of R. I've been having a look to sotored mails in list, but I've been not able to find one suiting to my need. The issue is I have a neighbour list in a TXT file, just as lists generated by social network softwares (f.i. Pajek), where you get Field1, Field2, Value. In my case, list follow the next way:ID1 IDP2 SUMVAL1 56 0.0659358951 900 0.0441101851 1409
2012 Apr 18
6
introducing R to high school students
I participate peripherally on a listserve for middle- and high-school science teachers. Sometimes questions about graphing or data analysis come up. I never miss an opportunity to advocate for R. However, the teachers are often skeptical that their students would be able to issue commands or write a little code; they think it would be too difficult. Perhaps this stems from the Microsoft- and
2008 Jul 28
2
Help with a loop
HI: I need ideas on how to make this code shorter (maybe with a second loop?). The code as it is works, but in this case I only have 14 samples, but it will become insane with more, so I need a way to make it more automatic. The problem is that the output from ts1, ts2, and so on is a vector with more than one value, so I do not know how to solve this. Thanks Prenewbie The code is the
2012 Sep 20
3
Line over Boxplot
Very much a rookie at R, and have only recently started using it again so pardon the simple question. I am trying to produce a box plot from one data set and then overlay a line plot from another data set. The box plot data set is made up of 20 sets of 30 data points, or 600 total data points. The line has only 30 total data points. The box plot is plotting fine, but for some reason, the line plot
2010 Jul 12
1
Custom nonlinear self starting function w/ 2 covariates
Hello, I'm trying to adjust a non linear model in which the biological response variable (ratio of germinated fungus spores) is dependent on 2 covariates (temperature and time). The response to temperature is modeled by a kind of beta function with 2 parameters (optimal and maximum temperatures) and the time function is a 2-parameter Weibull. Adjustments with nls or gnls work, but I need to
2005 Jan 31
2
coercing a list to a data frame, lists in foreloops
I have a set of time-series climate data with missing entries. I need to add rows for these missing entries to this data set. The only way I know to do this is unsing a foreloop, but this won't work on a list. I've tried to convert the list to a data frame, but that won't happen, either. I want to fill rows in this table: > newtest[10:15,] yrmos yearmo snow.sum snow.mean
2010 Jul 26
2
Concatenate a mix of numbers and letters to create a vector name
Dear all, I am trying to create a vector name, for example tmax.195012 from tmax., 1950 and 12. Obviously I don't wish to simply type it because the 3 name components are changing in each iteration within a loop. Is there any way of concatenating those 3 components (which are a mixture of numbers and letters)? Thanks for reading, Panos
2012 Mar 19
3
Issue with asin()
Hello everyone, I am working for a few days already on a basic algorithm, very common in applied agronomy, that aims to determine the degree-days necessary for a given individual to reach a given growth stade. The algorithm (and context) is explained here: http://www.oardc.ohio-state.edu/gdd/glossary.htm , and so I implemented my function in R as follows: DD <- function(Tmin, Tmax, Tseuil,
2004 Sep 06
1
A naive lsoda question....
Hello, I am an R newbie, trying to use lsoda to solve standard Lotka-Volterra competition equations. My question is: how do I pass a parameter that varies with time, like say, phix <- 0.7 + runif(tmax) in the example below. # defining function lotvol <- function(t,n,p){ x <- n[1]; y <- n[2] rx <- p["rx"]; ry <- p["ry"] Kx <-
2017 Sep 13
3
Slow, Incorrect Group Resolution through Winbind
Hello. I am observing some strange behavior on a Linux system that has joined a Windows Active Directory domain using the Samba suite. Our servers are based on Ubuntu v12.04 but have kernel v3.12.17 and Samba v4.3.6. The problem that I'm trying to understand is that group name resolution through Winbind occasionally fails. Here's an example where one group name could not be resolved. This
2017 Aug 19
4
My very first loop!! I failed. May I have some start-up aid?
Dear all, I have a data similar to this: myframe<- data.frame (ID=c("Ernie", "Ernie","Ernie","Ernie"), Timestamp=c("24.09.2012 08:00", "24.09.2012 09:00", "24.09.2012 10:00", "25.09.2012 10:00"), Longitude=c("8.481","8.482","8.483","8.481"),
2016 Apr 20
1
Use multiple cores on Linux
I am trying to run the following code in R on a Linux cluster. I would like to use the full processing power (specifying cores/nodes/memory). The code essentially runs predictions based on a GAM regression and saves the results as a CSV file for multiple sets of data (here I only show two). Is it possible to run this code using HPC packages such as Rmpi/snow/doParallel? Thank you!
2009 Nov 17
1
How to plot an image in R
Dear all Im new in R I have a necdf data set that I want to plot : this is my data set [1] "file Tmax.DJF.daily.1981_1999.echama2.nc has 4 dimensions:" [1] "longitude Size: 127" [1] "latitude Size: 110" [1] "ht Size: 1" [1] "t Size: 1680" [1] "------------------------" [1] "file Tmax.DJF.daily.1981_1999.echama2.nc has 1
2018 Jun 19
3
Paquete dismo, cálculo coeficiente de variación
Estimados erreros, Estoy intentando entender como calcula el paquete dismo ( https://cran.r-project.org/web/packages/dismo/index.html) un coeficiente de variación. Os pongo un ejemplo: tmin <- c(10,12,14,16,18,20,22,21,19,17,15,12) # temperatura mínima media mensual de un año tmax <- tmin + 5 # temperatura máxima media mensual de un año prec <- c(0,2,10,30,80,160,80,20,40,60,20,0)
2013 Nov 05
2
syslinux.efi pxeboot across multiple subnets
The same client was used for syslinux.efi (both success on same subnet and failure on different subnet) and grub.efi. The DHCP host block is setup like: host testing { hardware ethernet {mac} ; next-server 10.16.195.178 ; filename "rhel64/syslinux.efi" ; } I'll pull a tcpdump filtering by the IP tomorrow when I get back to the systems. On Mon, Nov 4, 2013 at 6:41 PM,
2017 Aug 19
0
My very first loop!! I failed. May I have some start-up aid?
Thank you for providing the example code... for the request of running it multiple times it would have helped if you could have confirmed that the example ran through without errors... there were a lot of mistakes in it. Look into using the reprex package to check your example next time. I don't do this kind of analysis... I really don't know what to expect from the functions. The
2006 May 11
1
Maximum value of two columns
Hello -- Given the 10x2 matrix below, my goal is to create a vector which contains the maximum of column 1 and column 2, or the only value if there is an NA in one column. I experimented with max.col without success. Thanks. --Dale > tmax.m tmaxhme tmaxer [1,] 101.0 99.8 [2,] 102.5 99.0 [3,] 100.6 98.4 [4,] NA 100.5 [5,] 101.0 99.4 [6,] NA
2018 Jun 19
2
Paquete dismo, cálculo coeficiente de variación
Hola, en la misma definici?n de la funci?n: # P15. Precipitation Seasonality(Coefficient of Variation) # the "1 +" is to avoid strange CVs for areas where mean rainfaill is < 1) p[,15] <- apply(prec+1, 1, cv) Un saludo, Jorge On Martes, 19 de Junio de 2018 13:07:27 Marcelino de la Cruz Rot escribi?: > Hola Jaume: > > Si miras el c?digo de biovars() ver?s que la
2006 Feb 27
1
4D stacked column chart, Excel -> R
Hi All. I'd like to programm a 4 dimensional chart in R. Acctually I wanted to solve that problem in Excel cause I had the data there. Here is a link of my actual problem description (there are some chart pictures as well).... http://www.mrexcel.com/board2/viewtopic.php?t=187336&highlight=stacked+column because I still couldn't solve that problem I came to R. The chart should be