similar to: conditional selection of dataframe rows

Displaying 20 results from an estimated 20000 matches similar to: "conditional selection of dataframe rows"

2012 Jun 20
2
reshape
Hello, helpeRs, I am attempting to reshape (either base R or package reshape) multiple .csv spreadsheets from a very unfortunate wide format to long format. ?Each spreadsheet looks something like this, after being read in to R: toy <- data.frame(year = rep(2007:2008,each = 20), month = rep(1:5,each = 4, length = 40), day = rep(1:2,each = 2,length = 40), hhmm = rep(1100:1101,length = 40),
2012 Nov 01
2
Name assignment in for loop
Dear helpeRs- I'm using a for loop to create a series of models. I'm trying to assign a name to each model created, using the loop index. The loop gets stuck at the name of the model, giving the error "target of assignment expands to non-language object". The linear model runs without error; only the name is problematic. Here is the current loop syntax. The use of dat
2010 Aug 18
1
syntax for batching rbind process
Dear helpeRs, I am attempting to read in a series of csv files so I can bind them into one large dataframe. I have written the following script: test <- list.files(".", pattern = "csv") #lline 1 imp <- list() #line 2 for (i in 1:length(test)) { #line 3 imp[i] <- read.csv(test[i]) #line 4 }
2010 Sep 28
2
Reshape
Hello, helpeRs, I've been trying, unsuccessfully, to change a dataframe from long to wide format using reshape (the original). I would appreciate it if someone could demonstrate the correct syntax. The script below will create a toy example. The new wide data should have a column name for each unique entry in the "fame" column. Under each column should be either the
2010 Mar 04
1
extracting values conditonal on other values
Dear R helpers, I have a dataframe (test1) containing the time of sunrise and sunset for each day of the year for 3 years. I have another dataframe (test2) containing measurements that are taken every 15 minutes, 24/7. I would like to extract all rows from test2 that occur between sunrise and sunset for the appropriate date. Can you suggest a good vectorized way to do this? Keep in mind
2010 Aug 27
3
interpreting date-related error message
Hello, helpeRs, I have a vector of numbers from 1-365 (days of the year) that I would like to convert to a date. There are no NA's and no missing values. I did not insert leading zero's for numbers less than 100. Using the syntax: dat$doy.1 <- as.numeric(format(dat$doy, "%j" )) I get the following error message: Error in prettyNum(.Internal(format(x, trim, digits,
2008 Jun 24
1
Error message: Bad value
Dear R help, In the middle of my session, I started receiving the error message "bad value" regardless of what I entered. I had to close R and restart it. When the error occurred, I was creating basic lattice plots, with no other add-on packages running. I am running R through John Fox's XEmacs interface, XEmacs version 21.4.20 on a Windows XP Pro machine with 2 GB of RAM. I have
2006 Dec 20
1
Reformat meteorological data
Dear HelpeRs: I have a data set in the following format, which will be familiar to those of you working with NCDC climate data. Example: Year <- rep(1:3, each = 3) Year <- c(Year,Year) ID <- rep(1:2, each = 9) Jan <- runif(18, min = 0, max = 20) Feb <- runif(18, min = 0, max = 20) Mar <- runif(18, min = 0, max = 20) var <- gl(3,1,18,label =
2009 Nov 05
2
Using a by() function to process several regression (lm()) functions
Hello, Thank you very much for looking at this. I have a "seasonal" user for R. I teach my undergrads and graduates students statistics using R and often find myself trying to solve problems to process student collected data in an efficient way. In this case, I have a data.frame with multiple observations. These are gas concentrations in a chamber and are used to measure into rates,
2018 Apr 09
1
linear regression with repeated measures
Dear list, this seemed to me like a very trivial question, but finally I haven't found any similar postings with suitable solutions on the net ... Basically, instead of regressing two simple series of measures 'a' and 'b' (like b ~ a), I would like to use independent replicate measurements for each variable at each level (ie, instead of having just one 'a' and one
2018 Sep 13
2
Routing(?) issue
Hello all I have weird problem i can't understand and don't know where to look. [root at chamber ~]# ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host
2012 Apr 14
2
master thesis
Hi, For my master thesis I have 24 micro-plots on which I did measurements during 3 months. The measurements were: - Rainfall and runoff events throughout 3monts (runoff being dependant on the rainfall, a coefficient (%) has been made per rainfall event and per 3 months) - Soil texture (3 different textures were differentiated) - Slope (3 classes of slopes) - Stoniness (one time measurement)
2018 Sep 14
2
Routing(?) issue
W dniu 13.09.2018 o?22:19, Oleg Cherkasov pisze: > On 13. sep. 2018 21:02, Marcin Trendota wrote: >> >> There is nginx on port 80. >> I've turned off SELinux for testing purposes. >> >> [root at chamber ~]# nmap chamber -p80 >> [...] >> PORT?? STATE SERVICE >> 80/tcp open? http >> >> [root at chamber ~]# nmap -p80
2003 Feb 04
2
testing slope
Hi all, I try to test a linear slope using offset. I have: > m2 <- glm(Y~X*V) > summary(m2) Call: glm(formula = Y ~ X * V) Deviance Residuals: Min 1Q Median 3Q Max -2.01688 -0.56028 0.05224 0.53213 3.60216 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.3673 0.8476 1.613 0.119788 X
2016 Apr 21
2
FirewallD issue
On Thursday 21 of April 2016 9:08:09 AM Gordon Messmer wrote: > On 04/21/2016 03:11 AM, Marcin Trendota wrote: > > But from host in another location (connected through VPN): > What host serves the VPN? If it's another host, how is that host > connected to the router? If it's "chamber," what type of VPN is it? It's OpenVPN on chamber. I've just noticed
2006 Apr 17
1
Equivalence test and factors
Hello, helpeRs, I recently used a linear mixed effects model followed by ANOVA to assess the relationship between a categorical predictor variable with 2 levels (and random effects) and a numeric response variable. As I was concerned about the lack of a power analysis prior to data collection, it was suggested that I use an equivalence test to complement the conventional hypothesis test.
2016 Apr 21
2
FirewallD issue
Hello everybody. Recently i moved external interface to zone "external" on my home server/router. And something strange is hapening. From my router (chamber, CentOS7) everything is fine: [root at chamber ~]# firewall-cmd --list-all home (default, active) interfaces: enp3s0 tun0 virbr0 sources: services: dhcp dhcpv6-client dns http https imaps ipp-client mdns nfs samba
2016 Apr 21
2
FirewallD issue
On Thursday 21 of April 2016 2:37:49 PM Gordon Messmer wrote: > On 04/21/2016 01:33 PM, Marcin Trendota wrote: > > It's OpenVPN on chamber. > What port is it using? I don't see the standard port listed in your > firewalld rules in either zone. 1194/udp. I added service openvpn and port 1194/udp (just to be sure) to both zones - no change. [root at chamber openvpn]#
2013 May 17
3
Command line not responding
Running 9.0-Stable on an i386. Whenever I type a command at the prompt I get the output /usr/local/lib/libintl.so.9: Undefined symbol "_ThreadRuneLocale" and nothing else - the command will not run. Just the above output. Commands like "ls" and "exit" work, but not much else. This happends whether I am logged in a user or as root. Cannot even halt the system from
2008 Aug 26
1
more dot plots on 1 page
Hi, I would like to have six dot plots on one page. I make the plots in a 'for loop' because it is six times the same graph but for different subjects (species). I tried it with "par(mfrow=c(3,2), oma=c(3,3,2,0), mar=c(2,2,2,2))"; but this does not work for dot plots apparently. Then I tried with print(). But then I had to give the dot plots names. This also does not work.